diff options
| author | Xeltica <7106976+Xeltica@users.noreply.github.com> | 2020-04-18 12:06:44 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-18 12:06:44 +0900 |
| commit | e184c1cdfbe757d4a14b4a94ed3ecb4800098f78 (patch) | |
| tree | 52c4a7c5769591032387b8ee54e7caf11eacd7b3 /src/server/api/endpoints/notes | |
| parent | chore: Update dep (diff) | |
| download | sharkey-e184c1cdfbe757d4a14b4a94ed3ecb4800098f78.tar.gz sharkey-e184c1cdfbe757d4a14b4a94ed3ecb4800098f78.tar.bz2 sharkey-e184c1cdfbe757d4a14b4a94ed3ecb4800098f78.zip | |
カスタム絵文字リアクションがプレビューされない不具合を修正 fix #6272 (#6273)
* カスタム絵文字リアクションがプレビューされない不具合を修正
* add comments
Diffstat (limited to 'src/server/api/endpoints/notes')
| -rw-r--r-- | src/server/api/endpoints/notes/reactions.ts | 6 |
1 files changed, 5 insertions, 1 deletions
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<NoteReaction>; 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({ |