mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-27 18:24:27 +01:00
renderReblog: fix types
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user