Add and use relay list settings

This commit is contained in:
2026-04-21 18:30:17 +04:00
parent c5316bf336
commit 8d40b3bb35
7 changed files with 332 additions and 25 deletions

15
app/utils/nostr.js Normal file
View File

@@ -0,0 +1,15 @@
export function normalizeRelayUrl(url) {
if (!url) return '';
let normalized = url.trim().toLowerCase();
if (!normalized) return '';
if (!normalized.startsWith('ws://') && !normalized.startsWith('wss://')) {
normalized = 'wss://' + normalized;
}
while (normalized.endsWith('/')) {
normalized = normalized.slice(0, -1);
}
return normalized;
}