From 7be6501571ec257feca2c3986b0eaa18c7f6b8b5 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Fri, 7 Feb 2020 21:37:24 +0900 Subject: [PATCH] EmojiReaction => EmojiReact (#5877) --- src/remote/activitypub/kernel/undo/index.ts | 1 + src/remote/activitypub/type.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/remote/activitypub/kernel/undo/index.ts b/src/remote/activitypub/kernel/undo/index.ts index 81decd1256..93909352d9 100644 --- a/src/remote/activitypub/kernel/undo/index.ts +++ b/src/remote/activitypub/kernel/undo/index.ts @@ -34,6 +34,7 @@ export default async (actor: IRemoteUser, activity: IUndo): Promise => { break; case 'Like': case 'EmojiReaction': + case 'EmojiReact': undoLike(actor, object as ILike); break; case 'Announce': diff --git a/src/remote/activitypub/type.ts b/src/remote/activitypub/type.ts index 6ee5349f20..35a0705168 100644 --- a/src/remote/activitypub/type.ts +++ b/src/remote/activitypub/type.ts @@ -171,7 +171,7 @@ export interface IRemove extends IActivity { } export interface ILike extends IActivity { - type: 'Like' | 'EmojiReaction'; + type: 'Like' | 'EmojiReaction' | 'EmojiReact'; _misskey_reaction?: string; } @@ -193,6 +193,6 @@ export const isAccept = (object: IObject): object is IAccept => object.type === export const isReject = (object: IObject): object is IReject => object.type === 'Reject'; export const isAdd = (object: IObject): object is IAdd => object.type === 'Add'; export const isRemove = (object: IObject): object is IRemove => object.type === 'Remove'; -export const isLike = (object: IObject): object is ILike => object.type === 'Like' || object.type === 'EmojiReaction'; +export const isLike = (object: IObject): object is ILike => object.type === 'Like' || object.type === 'EmojiReaction' || object.type === 'EmojiReact'; export const isAnnounce = (object: IObject): object is IAnnounce => object.type === 'Announce'; export const isBlock = (object: IObject): object is IBlock => object.type === 'Block';