Skip to content

群组内一键添加好友 || One-click to add friends to the group #251

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zhanzhangl
Copy link

@zhanzhangl zhanzhangl commented Aug 27, 2024

群组内一键添加好友


One-click to add friends to the group

Copy link

netlify bot commented Aug 27, 2024

👷 Deploy request for tailchat-nightly pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit da42fed

@github-actions github-actions bot changed the title 群组内一键添加好友 群组内一键添加好友 || One-click to add friends to the group Aug 27, 2024
@zhanzhangl
Copy link
Author

zhanzhangl commented Aug 27, 2024

修改密码处添加密码验证规则


Add password verification rules

@@ -45,6 +45,10 @@ const schema = createMetaFormSchema({
newPassword: metaFormFieldSchema
.string()
.min(6, t('密码不能低于6位'))
.matches(/[A-Z]/, '密码必须包含大写字母')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should wrap with t which can include translation support

@@ -84,6 +95,12 @@ export const GroupUserPopover: React.FC<{
<div className="pt-2">{pluginUserExtraInfoEl}</div>

<div className="text-right">
<Tooltip title={t('添加好友')}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think its should also have a permission check like allowSendMessage because its should can be close if some group dont wanna allow user DM

@@ -41,6 +43,15 @@ export const GroupUserPopover: React.FC<{
navigate(`/main/personal/converse/${converse._id}`);
}, [navigate]);

// 一键添加好友
const [, handleAddFriend] = useAsyncRequest(async () => {
const { data } = await request.post('/api/friend/request/add', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you should use addFriendRequest in client/shared/model/friend.ts

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants