fix(webchat): load root path

main
Peter Steinberger 2025-12-09 23:40:26 +00:00
parent dd88345483
commit 14d3a624d8
1 changed files with 4 additions and 1 deletions

View File

@ -172,7 +172,10 @@ final class WebChatWindowController: NSWindowController, WKNavigationDelegate, N
}
private func loadWebChat(baseEndpoint: URL) {
var comps = URLComponents(url: baseEndpoint.appendingPathComponent("webchat/"), resolvingAgainstBaseURL: false)
var comps = URLComponents(url: baseEndpoint, resolvingAgainstBaseURL: false)
if comps?.path.isEmpty ?? true {
comps?.path = "/"
}
var items = [URLQueryItem(name: "session", value: self.sessionKey)]
if let hostName = Host.current().localizedName ?? Host.current().name {
items.append(URLQueryItem(name: "host", value: hostName))