From 8234858ab74e20344dfbbda2b58023379487f005 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 10 Aug 2024 08:02:55 +0900 Subject: [PATCH] chore (backend): remove unused file --- .../src/remote/activitypub/renderer/like.ts | 30 ------------------- 1 file changed, 30 deletions(-) delete mode 100644 packages/backend/src/remote/activitypub/renderer/like.ts diff --git a/packages/backend/src/remote/activitypub/renderer/like.ts b/packages/backend/src/remote/activitypub/renderer/like.ts deleted file mode 100644 index a6ffeab9e1..0000000000 --- a/packages/backend/src/remote/activitypub/renderer/like.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { IsNull } from "typeorm"; -import { config } from "@/config.js"; -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 "backend-rs"; - -export const renderLike = async (noteReaction: NoteReaction, note: Note) => { - const reaction = noteReaction.reaction; - - 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}`, - content: reaction, - } as any; - - if (reaction.startsWith(":")) { - const name = reaction.replace(/:/g, ""); - const emoji = await Emojis.findOneBy({ - name, - host: IsNull(), - }); - - if (emoji) object.tag = [renderEmoji(emoji)]; - } - - return object; -};