From 1a03044be83b8d2f1190e0ddd26b2882509a8d1f Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Fri, 29 Sep 2023 17:37:16 +0200 Subject: [PATCH] [mastodon-client] Only return pinned attribute for own posts --- packages/backend/src/server/api/mastodon/converters/note.ts | 2 +- packages/backend/src/server/api/mastodon/entities/status.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/api/mastodon/converters/note.ts b/packages/backend/src/server/api/mastodon/converters/note.ts index 7ef55fc06..a592529cf 100644 --- a/packages/backend/src/server/api/mastodon/converters/note.ts +++ b/packages/backend/src/server/api/mastodon/converters/note.ts @@ -88,7 +88,7 @@ export class NoteConverter { const isPinned = user && note.userId === user.id ? UserNotePinings.exist({ where: {userId: user.id, noteId: note.id } }) - : false; + : undefined; // noinspection ES6MissingAwait return await awaitAll({ diff --git a/packages/backend/src/server/api/mastodon/entities/status.ts b/packages/backend/src/server/api/mastodon/entities/status.ts index 76132eaf8..db476b1a5 100644 --- a/packages/backend/src/server/api/mastodon/entities/status.ts +++ b/packages/backend/src/server/api/mastodon/entities/status.ts @@ -37,7 +37,7 @@ namespace MastodonEntity { poll: Poll | null; application: Application | null; language: string | null; - pinned: boolean | null; + pinned: boolean | undefined; reactions: Array; quote: Status | null; bookmarked: boolean;