From e184c1cdfbe757d4a14b4a94ed3ecb4800098f78 Mon Sep 17 00:00:00 2001 From: Xeltica <7106976+Xeltica@users.noreply.github.com> Date: Sat, 18 Apr 2020 12:06:44 +0900 Subject: カスタム絵文字リアクションがプレビューされない不具合を修正 fix #6272 (#6273) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * カスタム絵文字リアクションがプレビューされない不具合を修正 * add comments --- src/server/api/endpoints/notes/reactions.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/server/api/endpoints') diff --git a/src/server/api/endpoints/notes/reactions.ts b/src/server/api/endpoints/notes/reactions.ts index 4874c85b67..2621e2a12f 100644 --- a/src/server/api/endpoints/notes/reactions.ts +++ b/src/server/api/endpoints/notes/reactions.ts @@ -79,7 +79,11 @@ export default define(meta, async (ps, user) => { } as DeepPartial; if (ps.type) { - query.reaction = ps.type; + // ローカルリアクションはホスト名が . とされているが + // DB 上ではそうではないので、必要に応じて変換 + const suffix = '@.:'; + const type = ps.type.endsWith(suffix) ? ps.type.slice(0, ps.type.length - suffix.length) + ':' : ps.type; + query.reaction = type; } const reactions = await NoteReactions.find({ -- cgit v1.2.3-freya