From f1f0fa3bc7cbeabb1cb1508afcb81a65312b7592 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 25 Sep 2023 23:00:47 +0200 Subject: [PATCH] [mastodon-client] Fix posts falsely showing as boosted --- packages/backend/src/server/api/mastodon/converters/note.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/mastodon/converters/note.ts b/packages/backend/src/server/api/mastodon/converters/note.ts index 5ff76ea40..fd0224a51 100644 --- a/packages/backend/src/server/api/mastodon/converters/note.ts +++ b/packages/backend/src/server/api/mastodon/converters/note.ts @@ -17,6 +17,7 @@ import { populatePoll } from "@/models/repositories/note.js"; import { FileConverter } from "@/server/api/mastodon/converters/file.js"; import { awaitAll } from "@/prelude/await-all.js"; import { AccountCache, UserHelpers } from "@/server/api/mastodon/helpers/user.js"; +import { IsNull } from "typeorm"; export class NoteConverter { public static async encode(note: Note, user: ILocalUser | null, cache: AccountCache = UserHelpers.getFreshAccountCache()): Promise { @@ -49,7 +50,8 @@ export class NoteConverter { const isReblogged = user ? Notes.exist({ where: { userId: user.id, - renoteId: note.id + renoteId: note.id, + text: IsNull(), } }) : null;