mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
renderReblog: fix types
This commit is contained in:
parent
bc33f270d0
commit
57b0224517
1 changed files with 3 additions and 1 deletions
|
|
@ -104,12 +104,14 @@ async function renderReblog(event: DittoEvent) {
|
||||||
if (!event.author) return;
|
if (!event.author) return;
|
||||||
|
|
||||||
const repostId = event.tags.find(([name]) => name === 'p')?.[1];
|
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;
|
if (!event.repost) return;
|
||||||
|
|
||||||
const reblog = await renderStatus(event.repost);
|
const reblog = await renderStatus(event.repost);
|
||||||
reblog.reblogged = true;
|
reblog.reblogged = true;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: event.id,
|
id: event.id,
|
||||||
account: await renderAccount(event.author),
|
account: await renderAccount(event.author),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue