1
0
Fork 0
mirror of https://github.com/paricafe/misskey.git synced 2025-03-22 13:29:24 -05:00

Merge if-statements ()

This commit is contained in:
Aya Morisawa 2018-12-02 22:32:09 +09:00 committed by GitHub
parent 2e83440e70
commit 03588b3fd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);