From 0554dd8375bffac688dfbce6cabf02fc4fbf36ad Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 7 Mar 2023 17:12:46 +0900 Subject: [PATCH] =?UTF-8?q?enhance(client):=20DM=E4=BD=9C=E6=88=90?= =?UTF-8?q?=E6=99=82=E3=81=AB=E3=83=A1=E3=83=B3=E3=82=B7=E3=83=A7=E3=83=B3?= =?UTF-8?q?=E3=82=82=E5=90=AB=E3=82=80=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 10 +++++++++- packages/frontend/src/components/MkPostForm.vue | 4 ++++ packages/frontend/src/scripts/get-user-menu.ts | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f067de2926..65ee5ecfde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,19 @@ - ### Bugfixes -x +- You should also include the user name that made the change. --> +## 13.x.x (unreleased) + +### Improvements +- enhance(client): DM作成時にメンションも含むように + +### Bugfixes +- + ## 13.9.2 (2023/03/06) ### Improvements diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index 09f672be7b..0de15f2eb8 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -422,6 +422,10 @@ function pushVisibleUser(user) { function addVisibleUser() { os.selectUser().then(user => { pushVisibleUser(user); + + if (!text.includes(`@${user.username}`)) { + text = `@${Acct.toString(user)} ${text}`; + } }); } diff --git a/packages/frontend/src/scripts/get-user-menu.ts b/packages/frontend/src/scripts/get-user-menu.ts index 5170ca4c8c..f5aa551bdb 100644 --- a/packages/frontend/src/scripts/get-user-menu.ts +++ b/packages/frontend/src/scripts/get-user-menu.ts @@ -111,7 +111,7 @@ export function getUserMenu(user: misskey.entities.UserDetailed, router: Router icon: 'ti ti-mail', text: i18n.ts.sendMessage, action: () => { - os.post({ specified: user }); + os.post({ specified: user, initialText: `@${user.username} ` }); }, }, null, { type: 'parent',