From 74a3375886c6fe5e5664f1a03dba0bb4822581f8 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Wed, 10 Apr 2024 18:21:59 +0200 Subject: [PATCH] [backend] Add quote_id to mastodon api note responses --- packages/backend/src/server/api/mastodon/converters/note.ts | 1 + packages/backend/src/server/api/mastodon/entities/status.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/backend/src/server/api/mastodon/converters/note.ts b/packages/backend/src/server/api/mastodon/converters/note.ts index dea6d7240..85ef9b59b 100644 --- a/packages/backend/src/server/api/mastodon/converters/note.ts +++ b/packages/backend/src/server/api/mastodon/converters/note.ts @@ -188,6 +188,7 @@ export class NoteConverter { reactions: populated.then(populated => Promise.resolve(reaction).then(reaction => this.encodeReactions(note.reactions, reaction?.reaction, populated))), bookmarked: isBookmarked, quote: reblog.then(reblog => isQuote(note) ? reblog : null), + quote_id: isQuote(note) ? note.renoteId : null, edited_at: note.updatedAt?.toISOString() ?? null, filtered: filtered, }); diff --git a/packages/backend/src/server/api/mastodon/entities/status.ts b/packages/backend/src/server/api/mastodon/entities/status.ts index ce1d5b05b..065ed98e8 100644 --- a/packages/backend/src/server/api/mastodon/entities/status.ts +++ b/packages/backend/src/server/api/mastodon/entities/status.ts @@ -41,6 +41,7 @@ namespace MastodonEntity { pinned: boolean | undefined; reactions: Array; quote: Status | null; + quote_id: string | null; bookmarked: boolean; edited_at: string | null; filtered: Array | null;