From 248cd96a39c4c07efada8f74604ddadc03ee0103 Mon Sep 17 00:00:00 2001 From: naskya Date: Thu, 15 Feb 2024 23:22:30 +0900 Subject: [PATCH] feat: send the actual emoji reaction by the like button --- docs/changelog.md | 4 ++++ .../backend/src/remote/activitypub/renderer/like.ts | 10 ++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index d6502a4790..736a0f3996 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,7 @@ +# Unreleased + +- clicking the "like" button now sends the actual emoji reaction (star, good, heart, etc.) instead of an empty "like" + # v20240215 - separate settings for displaying rounded avatars for cat and non-cat accounts diff --git a/packages/backend/src/remote/activitypub/renderer/like.ts b/packages/backend/src/remote/activitypub/renderer/like.ts index 53c66c5c92..6f810cd201 100644 --- a/packages/backend/src/remote/activitypub/renderer/like.ts +++ b/packages/backend/src/remote/activitypub/renderer/like.ts @@ -4,23 +4,17 @@ import type { NoteReaction } from "@/models/entities/note-reaction.js"; import type { Note } from "@/models/entities/note.js"; import { Emojis } from "@/models/index.js"; import renderEmoji from "./emoji.js"; -import { fetchMeta } from "@/misc/fetch-meta.js"; export const renderLike = async (noteReaction: NoteReaction, note: Note) => { const reaction = noteReaction.reaction; - const meta = await fetchMeta(); const object = { type: "Like", id: `${config.url}/likes/${noteReaction.id}`, actor: `${config.url}/users/${noteReaction.userId}`, object: note.uri ? note.uri : `${config.url}/notes/${noteReaction.noteId}`, - ...(!meta.defaultReaction.includes(reaction) - ? { - content: reaction, - _misskey_reaction: reaction, - } - : {}), + content: reaction, + _misskey_reaction: reaction, } as any; if (reaction.startsWith(":")) {