diff options
| author | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2018-12-02 22:32:09 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-02 22:32:09 +0900 |
| commit | 03588b3fd67e7f52360a511a65bfe91b94c446bd (patch) | |
| tree | df666958c9585ac1b6f528d21acb362dbf458b70 /src/remote/activitypub | |
| parent | 10.60.2 (diff) | |
| download | sharkey-03588b3fd67e7f52360a511a65bfe91b94c446bd.tar.gz sharkey-03588b3fd67e7f52360a511a65bfe91b94c446bd.tar.bz2 sharkey-03588b3fd67e7f52360a511a65bfe91b94c446bd.zip | |
Merge if-statements (#3478)
Diffstat (limited to 'src/remote/activitypub')
| -rw-r--r-- | src/remote/activitypub/kernel/like.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/remote/activitypub/kernel/like.ts b/src/remote/activitypub/kernel/like.ts index 17ec73f12b..57d1c37fa0 100644 --- a/src/remote/activitypub/kernel/like.ts +++ b/src/remote/activitypub/kernel/like.ts @@ -21,10 +21,8 @@ export default async (actor: IRemoteUser, activity: ILike) => { let reaction = 'pudding'; // 他のMisskeyインスタンスからのリアクション - if (activity._misskey_reaction) { - if (validateReaction.ok(activity._misskey_reaction)) { - reaction = activity._misskey_reaction; - } + if (activity._misskey_reaction && validateReaction.ok(activity._misskey_reaction)) { + reaction = activity._misskey_reaction; } await create(actor, note, reaction); |