From 290bf9c72610fa657ed16f3de9a269e6b80017ac Mon Sep 17 00:00:00 2001 From: Silberengel Date: Tue, 11 Nov 2025 07:09:09 +0100 Subject: [PATCH] allow broadcast parameter for wine filter relay --- src/lib/url.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/lib/url.ts b/src/lib/url.ts index 389f62e..6d4ae7c 100644 --- a/src/lib/url.ts +++ b/src/lib/url.ts @@ -18,14 +18,13 @@ export function normalizeUrl(url: string): string { // Parse the URL first to validate it const p = new URL(url) - // Check if URL has query parameters or hash fragments that suggest it's not a relay - // Relay URLs shouldn't have query params like ?token= or hash fragments - const hasQueryParams = url.includes('?') + // Check if URL has hash fragments (these are not valid for relay URLs) + // Note: Query parameters are allowed (e.g., filter.nostr.wine uses ?broadcast=true/false) const hasHashFragment = url.includes('#') - // Block URLs with query params or hash fragments (these are likely not relays) - if (hasQueryParams || hasHashFragment) { - logger.warn('Skipping URL with query/hash (not a relay)', { url }) + // Block URLs with hash fragments (these are not valid for relays) + if (hasHashFragment) { + logger.warn('Skipping URL with hash fragment (not a relay)', { url }) return '' }