From 57b022451723db127273f1bd3dade45a3fc62ac7 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 8 Apr 2024 11:34:21 -0500 Subject: [PATCH] renderReblog: fix types --- src/views/mastodon/statuses.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/mastodon/statuses.ts b/src/views/mastodon/statuses.ts index 35f89c5..791263c 100644 --- a/src/views/mastodon/statuses.ts +++ b/src/views/mastodon/statuses.ts @@ -104,12 +104,14 @@ async function renderReblog(event: DittoEvent) { if (!event.author) return; const repostId = event.tags.find(([name]) => name === 'p')?.[1]; - event.repost = await getEvent(repostId, { kind: 1 }); + if (!repostId) return; + event.repost = await getEvent(repostId, { kind: 1 }); if (!event.repost) return; const reblog = await renderStatus(event.repost); reblog.reblogged = true; + return { id: event.id, account: await renderAccount(event.author),