mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-06 23:24:22 +01:00
db/relays: normalize url before inserting
This commit is contained in:
@@ -6,7 +6,7 @@ function addRelays(relays: `wss://${string}`[]) {
|
||||
if (!relays.length) return Promise.resolve();
|
||||
|
||||
const values = relays.map((url) => ({
|
||||
url,
|
||||
url: new URL(url).toString(),
|
||||
domain: tldts.getDomain(url)!,
|
||||
active: true,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user