From 26845416932ecf0ce035240ce934d2afb77bf550 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Mon, 18 Mar 2019 00:03:57 +0900 Subject: Custom reaction (#4517) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Custom reaction * increase limit of reactions/delete * リアクションの場合は OS標準の絵文字を使用 を迂回する * カスタムリアクションを無効にする設定 * fix * disableCustomReaction --> enableEmojiReaction * Avoid MFM rendering * :art: * :art: * Auto accept * custom emoji reaction * Improve usability * Extract emojiRegex * Fix * Clean up * :art: * :art: * toDbReaction で reaction は必須に あとフォールバックは like に * Clean up * Make required * https://github.com/syuilo/misskey/pull/4517/commits/3eb08748feeaab9ee5c5b505c870f97d7edbeb0d#r266241728 * Refactor * Allow null --- src/remote/activitypub/kernel/like.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/remote/activitypub/kernel') diff --git a/src/remote/activitypub/kernel/like.ts b/src/remote/activitypub/kernel/like.ts index d36f63c79e..ed35da8133 100644 --- a/src/remote/activitypub/kernel/like.ts +++ b/src/remote/activitypub/kernel/like.ts @@ -3,7 +3,6 @@ import Note from '../../../models/note'; import { IRemoteUser } from '../../../models/user'; import { ILike } from '../type'; import create from '../../../services/note/reaction/create'; -import { validateReaction } from '../../../models/note-reaction'; export default async (actor: IRemoteUser, activity: ILike) => { const id = typeof activity.object == 'string' ? activity.object : activity.object.id; @@ -18,12 +17,5 @@ export default async (actor: IRemoteUser, activity: ILike) => { throw new Error(); } - let reaction = 'like'; - - // 他のMisskeyインスタンスからのリアクション - if (activity._misskey_reaction && validateReaction.ok(activity._misskey_reaction)) { - reaction = activity._misskey_reaction; - } - - await create(actor, note, reaction); + await create(actor, note, activity._misskey_reaction); }; -- cgit v1.2.3-freya