Skip to content

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

Open
zhanzhangl wants to merge 2 commits into
msgbyte:masterfrom
zhanzhangl:master
Open

群组内一键添加好友 || One-click to add friends to the group#251
zhanzhangl wants to merge 2 commits into
msgbyte:masterfrom
zhanzhangl:master

Conversation

@zhanzhangl

@zhanzhangl zhanzhangl commented Aug 27, 2024

Copy link
Copy Markdown

群组内一键添加好友


One-click to add friends to the group

@netlify

netlify Bot commented Aug 27, 2024

Copy link
Copy Markdown

👷 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 群组内一键添加好友 Aug 27, 2024
@zhanzhangl

zhanzhangl commented Aug 27, 2024

Copy link
Copy Markdown
Author

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


Add password verification rules

newPassword: metaFormFieldSchema
.string()
.min(6, t('密码不能低于6位'))
.matches(/[A-Z]/, '密码必须包含大写字母')

Copy link
Copy Markdown
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

<div className="pt-2">{pluginUserExtraInfoEl}</div>

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

Copy link
Copy Markdown
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


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

Copy link
Copy Markdown
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants