Remove trailing slash when adding a relay

Changelog-Fixed: Remove trailing slash when adding a relay
Closes: #562
This commit is contained in:
middlingphys
2023-02-09 16:46:23 +09:00
committed by William Casarin
parent 062b5dc040
commit 1f6657e471

View File

@@ -48,6 +48,10 @@ struct RelayConfigView: View {
relay = "wss://" + relay
}
if relay.hasSuffix("/") {
relay.removeLast();
}
guard let url = URL(string: relay) else {
return
}