summaryrefslogtreecommitdiff
path: root/src/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api')
-rw-r--r--src/server/api/endpoints/notes/reactions.ts6
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({