From 8082da17e732d367fe51df3502f3561e92f7f9ee Mon Sep 17 00:00:00 2001 From: KoalaSat Date: Sun, 19 Nov 2023 09:00:04 +0100 Subject: [PATCH] Fix model --- frontend/Functions/RelayFunctions/Metadata/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/Functions/RelayFunctions/Metadata/index.ts b/frontend/Functions/RelayFunctions/Metadata/index.ts index 5e60088..0926d35 100644 --- a/frontend/Functions/RelayFunctions/Metadata/index.ts +++ b/frontend/Functions/RelayFunctions/Metadata/index.ts @@ -1,6 +1,5 @@ import { type RelayMetadata } from '../../DatabaseFunctions/RelayMetadatas' import { type Relay } from '../../DatabaseFunctions/Relays' -import { median } from '../../NativeFunctions' import { getRTags } from '../Events' export interface ResilientAssignation { @@ -24,6 +23,9 @@ export const getContactsRelays: ( const urls = rTags.map((tags) => tags[1]) urls.forEach((url) => { if (!localhostRegExp.test(url)) { + if (url.endsWith('/')) { + url = url.slice(0, -1); + } relaysPresence[url] = [...(relaysPresence[url] ?? []), metadata.pubkey] } })