mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
db/relays: normalize url before inserting
This commit is contained in:
parent
2ff40c8fc5
commit
5c02fd0773
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||
}));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue