mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-29 21:37:34 -07:00
ダイレクトでメンションでもユーザーを指定できるように (#3722)
This commit is contained in:
parent
ed8e55d9a2
commit
3868fc7459
2 changed files with 7 additions and 1 deletions
|
@ -42,7 +42,7 @@ export const meta = {
|
|||
},
|
||||
|
||||
visibleUserIds: {
|
||||
validator: $.arr($.type(ID)).optional.unique().min(1),
|
||||
validator: $.arr($.type(ID)).optional.unique().min(0),
|
||||
transform: transformMany,
|
||||
desc: {
|
||||
'ja-JP': '(投稿の公開範囲が specified の場合)投稿を閲覧できるユーザー'
|
||||
|
|
|
@ -182,6 +182,12 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
|
|||
mentionedUsers.push(u);
|
||||
}
|
||||
}
|
||||
|
||||
for (const u of mentionedUsers) {
|
||||
if (!data.visibleUsers.some(x => x._id.equals(u._id))) {
|
||||
data.visibleUsers.push(u);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const note = await insertNote(user, data, tags, emojis, mentionedUsers);
|
||||
|
|
Loading…
Reference in a new issue