From 4e032a918873a8200a9729551cb42444713b04f0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 22 Apr 2018 10:53:27 +0900 Subject: [PATCH] [wip] #1455 --- src/services/note/reaction/create.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/services/note/reaction/create.ts b/src/services/note/reaction/create.ts index dcfbe481af..06fd6c0576 100644 --- a/src/services/note/reaction/create.ts +++ b/src/services/note/reaction/create.ts @@ -46,11 +46,13 @@ export default async (user: IUser, note: INote, reaction: string) => new Promise publishNoteStream(note._id, 'reacted'); - // Notify - notify(note.userId, user._id, 'reaction', { - noteId: note._id, - reaction: reaction - }); + // リアクションされたユーザーがローカルユーザーなら通知を作成 + if (isLocalUser(note._user)) { + notify(note.userId, user._id, 'reaction', { + noteId: note._id, + reaction: reaction + }); + } pushSw(note.userId, 'reaction', { user: await packUser(user, note.userId),