|
|
|
|
@ -1570,9 +1570,15 @@ class ClientService extends EventTarget {
@@ -1570,9 +1570,15 @@ class ClientService extends EventTarget {
|
|
|
|
|
return relays |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const normalizedBlocked = blockedRelays.map(url => normalizeUrl(url) || url) |
|
|
|
|
// Helper function to safely normalize URLs
|
|
|
|
|
const safeNormalize = (url: string): string => { |
|
|
|
|
const normalized = normalizeUrl(url) |
|
|
|
|
return normalized || url |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const normalizedBlocked = blockedRelays.map(safeNormalize) |
|
|
|
|
return relays.filter(relay => { |
|
|
|
|
const normalizedRelay = normalizeUrl(relay) || relay |
|
|
|
|
const normalizedRelay = safeNormalize(relay) |
|
|
|
|
return !normalizedBlocked.includes(normalizedRelay) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|