server hostnames

This commit is contained in:
Ian Gulliver
2026-10-20 14:00:54 -07:00
parent 2dfcc5de47
commit f76bddc6d6
+2 -1
View File
@@ -153,7 +153,8 @@ private func syncError(_ error: (any Error)?) -> String {
func serverName(_ origin: String) -> String {
let host = URL(string: origin)?.host() ?? origin
return host.split(separator: ".").first.map(String.init) ?? host
let node = host.split(separator: ".").first.map(String.init) ?? host
return node.hasPrefix("byre-") ? String(node.dropFirst(5)) : node
}
@MainActor