enhance(client): DM作成時にメンションも含むように

This commit is contained in:
syuilo 2023-03-07 17:12:46 +09:00
parent 1ef6bec133
commit 0554dd8375
3 changed files with 14 additions and 2 deletions

View File

@ -5,11 +5,19 @@
- -
### Bugfixes ### Bugfixes
x -
You should also include the user name that made the change. 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) ## 13.9.2 (2023/03/06)
### Improvements ### Improvements

View File

@ -422,6 +422,10 @@ function pushVisibleUser(user) {
function addVisibleUser() { function addVisibleUser() {
os.selectUser().then(user => { os.selectUser().then(user => {
pushVisibleUser(user); pushVisibleUser(user);
if (!text.includes(`@${user.username}`)) {
text = `@${Acct.toString(user)} ${text}`;
}
}); });
} }

View File

@ -111,7 +111,7 @@ export function getUserMenu(user: misskey.entities.UserDetailed, router: Router
icon: 'ti ti-mail', icon: 'ti ti-mail',
text: i18n.ts.sendMessage, text: i18n.ts.sendMessage,
action: () => { action: () => {
os.post({ specified: user }); os.post({ specified: user, initialText: `@${user.username} ` });
}, },
}, null, { }, null, {
type: 'parent', type: 'parent',