From 3f2104968c19838e5b8838b823f0a62db49d94ef Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Wed, 5 Apr 2023 12:04:28 -0500 Subject: [PATCH 1/2] filter nostr notes better --- src/components/waitlist/Notes.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/waitlist/Notes.tsx b/src/components/waitlist/Notes.tsx index df196ae..5df6a1d 100644 --- a/src/components/waitlist/Notes.tsx +++ b/src/components/waitlist/Notes.tsx @@ -34,9 +34,19 @@ const Note: Component<{ e: NostrEvent }> = (props) => { ) } +function filterReplies(event: Event) { + // If there's a "p" tag or an "e" tag we want to return false, otherwise true + for (const tag of event.tags) { + if (tag[0] === "p" || tag[0] === "e") { + return false + } + } + return true +} + const Notes: Component<{ notes: Event[] }> = (props) => { return (