diff --git a/src/views/mastodon/statuses.ts b/src/views/mastodon/statuses.ts index 989bdef..37e86bf 100644 --- a/src/views/mastodon/statuses.ts +++ b/src/views/mastodon/statuses.ts @@ -76,8 +76,6 @@ async function renderStatus(event: DittoEvent, opts: statusOpts): Promise { const media = [...mediaLinks, ...mediaTags]; - const quoteStatus = !event.quote_repost ? null : await renderStatus(event.quote_repost, { depth: depth + 1 }); - return { id: event.id, account, @@ -105,8 +103,8 @@ async function renderStatus(event: DittoEvent, opts: statusOpts): Promise { tags: [], emojis: renderEmojis(event), poll: null, - quote: quoteStatus, - quote_id: quoteStatus ? quoteStatus.id : null, + quote: !event.quote_repost ? null : await renderStatus(event.quote_repost, { depth: depth + 1 }), + quote_id: event.tags.find(([name]) => name === 'q')?.[1] ?? null, uri: Conf.external(note), url: Conf.external(note), zapped: Boolean(zapEvent),