From 0da9d2e3f460977c96def55e91cebd8cd2d4f279 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Mon, 8 Apr 2024 13:28:30 -0300 Subject: [PATCH 1/2] fix: find event and not pubkey in renderReblog --- src/views/mastodon/statuses.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/mastodon/statuses.ts b/src/views/mastodon/statuses.ts index 35f89c5..c386f40 100644 --- a/src/views/mastodon/statuses.ts +++ b/src/views/mastodon/statuses.ts @@ -103,7 +103,8 @@ async function renderStatus(event: DittoEvent, viewerPubkey?: string) { async function renderReblog(event: DittoEvent) { if (!event.author) return; - const repostId = event.tags.find(([name]) => name === 'p')?.[1]; + const repostId = event.tags.find(([name]) => name === 'e')?.[1]; + if (!repostId) return; event.repost = await getEvent(repostId, { kind: 1 }); if (!event.repost) return; From 06ca3706b870d520ca2d76a04c9ac6397800c2c5 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 9 Apr 2024 14:27:41 +0000 Subject: [PATCH 2/2] Apply 1 suggestion(s) to 1 file(s) --- src/views/mastodon/statuses.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/mastodon/statuses.ts b/src/views/mastodon/statuses.ts index 0a78060..6762e82 100644 --- a/src/views/mastodon/statuses.ts +++ b/src/views/mastodon/statuses.ts @@ -105,7 +105,6 @@ async function renderReblog(event: DittoEvent) { const repostId = event.tags.find(([name]) => name === 'e')?.[1]; if (!repostId) return; - event.repost = await getEvent(repostId, { kind: 1 }); event.repost = await getEvent(repostId, { kind: 1 }); if (!event.repost) return;