summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-22 10:53:27 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-22 10:53:27 +0900
commit4e032a918873a8200a9729551cb42444713b04f0 (patch)
treea1242025d59f297ff5d2f9b59e0000508bd5ee62 /src
parentAP: 投票をレンダリング (diff)
downloadsharkey-4e032a918873a8200a9729551cb42444713b04f0.tar.gz
sharkey-4e032a918873a8200a9729551cb42444713b04f0.tar.bz2
sharkey-4e032a918873a8200a9729551cb42444713b04f0.zip
[wip] #1455
Diffstat (limited to 'src')
-rw-r--r--src/services/note/reaction/create.ts12
1 files 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),