From 910d75915546bdd9728e35edd9274ef50be45f7a Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 29 Apr 2026 12:30:03 -0700 Subject: [PATCH] Allow goals without valid relay URLs, fall back to user's relays --- src/lib/goalUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/goalUtils.ts b/src/lib/goalUtils.ts index 40ba46f2..443e08cc 100644 --- a/src/lib/goalUtils.ts +++ b/src/lib/goalUtils.ts @@ -64,12 +64,12 @@ export function parseGoalEvent(event: NostrEvent): ParsedGoal | null { const amountMsat = parseInt(amountStr, 10); if (isNaN(amountMsat) || amountMsat <= 0) return null; - // Required: relays tag + // Relays tag — preferred but not required. When empty, the goal progress + // hook falls back to the user's configured relays. const relaysTag = event.tags.find(([n]) => n === 'relays'); const relays = relaysTag ? [...new Set(relaysTag.slice(1).map(normalizeRelayUrl).filter((v): v is string => !!v))] : []; - if (relays.length === 0) return null; // Optional tags const closedAtStr = event.tags.find(([n]) => n === 'closed_at')?.[1];