diff --git a/src/Element/Relays.tsx b/src/Element/Relays.tsx index f1a3acec..b1fd9160 100644 --- a/src/Element/Relays.tsx +++ b/src/Element/Relays.tsx @@ -15,7 +15,11 @@ interface RelaysProps { } const RelayFavicon = ({ url }: { url: string }) => { - const cleanUrl = url.replace("wss://relay.", "https://").replace("wss://nostr.", "https://"); + const cleanUrl = url + .replace("wss://relay.", "https://") + .replace("wss://nostr.", "https://") + .replace("wss://", "https://") + .replace(/\/$/, ""); const [faviconUrl, setFaviconUrl] = useState(`${cleanUrl}/favicon.ico`); return setFaviconUrl(Nostrich)} />;