From 5df1de8b1ae732fcdc2b3629a406da3d31c4afdd Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 6 Aug 2018 04:38:31 +0900 Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E5=85=AC=E9=96=8B=E3=81=AE=E6=8A=95?= =?UTF-8?q?=E7=A8=BF=E3=81=AB=E8=87=AA=E5=88=86=E4=BB=A5=E5=A4=96=E3=81=8C?= =?UTF-8?q?=E8=BF=94=E4=BF=A1=E3=81=97=E3=81=9F=E3=82=8ARenote=E3=81=97?= =?UTF-8?q?=E3=81=9F=E3=82=8A=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/note/create.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/services/note/create.ts b/src/services/note/create.ts index 136e4fd07..4f90a19f2 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -111,6 +111,16 @@ export default async (user: IUser, data: Option, silent = false) => new Promise< return rej(); } + // リプライ先が自分以外の非公開の投稿なら禁止 + if (data.reply && data.reply.visibility == 'private' && !data.reply.userId.equals(user._id)) { + return rej(); + } + + // Renote先が自分以外の非公開の投稿なら禁止 + if (data.renote && data.renote.visibility == 'private' && !data.renote.userId.equals(user._id)) { + return rej(); + } + if (data.text) { data.text = data.text.trim(); }