Apply 1 suggestion(s) to 1 file(s)

This commit is contained in:
Alex Gleason 2024-04-08 15:53:08 +00:00
parent 1f7a4664ec
commit d7d52bbdee
1 changed files with 2 additions and 6 deletions

View File

@ -101,12 +101,8 @@ async function renderStatus(event: DittoEvent, viewerPubkey?: string) {
async function renderReblog(event: DittoEvent) {
if (!event.author) return;
for (let i = 0; i < event.tags.length; i++) {
if (event.tags[i][0] === 'e') {
event.repost = await getEvent(event.tags[i][1], { kind: 1 });
break;
}
}
const repostId = event.tags.find(([name]) => name === 'p')?.[1];
event.repost = await getEvent(repostId, { kind: 1 });
if (!event.repost) return;