[mastodon-client] Fix html cache prewarm not including quote uris

This commit is contained in:
Laura Hausmann 2023-11-28 17:50:21 +01:00
parent 30631418d9
commit aaed62bde1
Signed by: zotan
GPG key ID: D044E84C5BE01605

View file

@ -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}`)