[backend] Add quote_id to mastodon api note responses

This commit is contained in:
Laura Hausmann 2024-04-10 18:21:59 +02:00
parent 5a30581c73
commit 74a3375886
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605
2 changed files with 2 additions and 0 deletions

View File

@ -188,6 +188,7 @@ export class NoteConverter {
reactions: populated.then(populated => Promise.resolve(reaction).then(reaction => this.encodeReactions(note.reactions, reaction?.reaction, populated))), reactions: populated.then(populated => Promise.resolve(reaction).then(reaction => this.encodeReactions(note.reactions, reaction?.reaction, populated))),
bookmarked: isBookmarked, bookmarked: isBookmarked,
quote: reblog.then(reblog => isQuote(note) ? reblog : null), quote: reblog.then(reblog => isQuote(note) ? reblog : null),
quote_id: isQuote(note) ? note.renoteId : null,
edited_at: note.updatedAt?.toISOString() ?? null, edited_at: note.updatedAt?.toISOString() ?? null,
filtered: filtered, filtered: filtered,
}); });

View File

@ -41,6 +41,7 @@ namespace MastodonEntity {
pinned: boolean | undefined; pinned: boolean | undefined;
reactions: Array<Reaction>; reactions: Array<Reaction>;
quote: Status | null; quote: Status | null;
quote_id: string | null;
bookmarked: boolean; bookmarked: boolean;
edited_at: string | null; edited_at: string | null;
filtered: Array<FilterResult> | null; filtered: Array<FilterResult> | null;