diff --git a/src/services/note/create.ts b/src/services/note/create.ts index 84daa7dfe7..20fa4a8d5b 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -188,6 +188,11 @@ export default async (user: IUser, data: Option, silent = false) => new Promise< data.visibleUsers.push(u); } } + + // ダイレクト投稿でユーザーが指定されていなかったらreject + if (data.visibleUsers.length === 0) { + return rej('Target user is not specified'); + } } const note = await insertNote(user, data, tags, emojis, mentionedUsers);