From aaed62bde11daeef6b84d093e2d628e997736642 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Tue, 28 Nov 2023 17:50:21 +0100 Subject: [PATCH] [mastodon-client] Fix html cache prewarm not including quote uris --- packages/backend/src/server/api/mastodon/converters/note.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/backend/src/server/api/mastodon/converters/note.ts b/packages/backend/src/server/api/mastodon/converters/note.ts index bc2b53ff3..dea6d7240 100644 --- a/packages/backend/src/server/api/mastodon/converters/note.ts +++ b/packages/backend/src/server/api/mastodon/converters/note.ts @@ -364,6 +364,10 @@ export class NoteConverter { const identifier = `${note.id}:${(note.updatedAt ?? note.createdAt).getTime()}`; if (await this.noteContentHtmlCache.get(identifier) !== undefined) return; + if (note.renoteId !== null && !note.renote) { + note.renote = await Notes.findOneBy({ id: note.renoteId }); + } + const quoteUri = note.renote ? isQuote(note) ? (note.renote.url ?? note.renote.uri ?? `${config.url}/notes/${note.renote.id}`)