From 8886a24f161c486c18575f63bb17ef73894bc8a7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 3 Dec 2018 17:20:15 +0900 Subject: [PATCH] :v: --- src/ai.ts | 10 ++++++---- src/modules/follow/index.ts | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ai.ts b/src/ai.ts index 9cfbdfd..2fc308b 100644 --- a/src/ai.ts +++ b/src/ai.ts @@ -125,10 +125,12 @@ export default class 藍 { }); } else { // リアクションする - this.api('notes/reactions/create', { - noteId: msg.id, - reaction: reaction - }); + if (reaction) { + this.api('notes/reactions/create', { + noteId: msg.id, + reaction: reaction + }); + } } }, 1000); } diff --git a/src/modules/follow/index.ts b/src/modules/follow/index.ts index 0a01e63..6719d91 100644 --- a/src/modules/follow/index.ts +++ b/src/modules/follow/index.ts @@ -17,11 +17,11 @@ export default class FollowModule implements IModule { userId: msg.userId, }); return { - reaction: 'like' + reaction: msg.friend.love >= 0 ? 'like' : null }; } else { return { - reaction: 'hmm' + reaction: msg.friend.love >= 0 ? 'hmm' : null }; } } else {