From 98acf919f147d78720b98ef3a7af2233a4b08bca Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 23 Dec 2018 04:17:42 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=80=E3=82=A4=E3=83=AC=E3=82=AF=E3=83=88?= =?UTF-8?q?=E6=8A=95=E7=A8=BF=E3=81=A7=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC?= =?UTF-8?q?=E3=81=8C=E6=8C=87=E5=AE=9A=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F=E3=82=89reject=E3=81=99?= =?UTF-8?q?=E3=82=8B=20(#3724)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/note/create.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/services/note/create.ts b/src/services/note/create.ts index 84daa7dfe..20fa4a8d5 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);