mirror of
https://github.com/hub-team/OnlineChatSdk-SwiftPM.git
synced 2026-04-14 08:49:01 +00:00
update 0.1.2
This commit is contained in:
@@ -213,7 +213,6 @@ open class ChatController: UIViewController, WKNavigationDelegate, WKScriptMessa
|
||||
if apiToken != "" {
|
||||
ChatConfig.setApiToken(apiToken)
|
||||
}
|
||||
|
||||
var setup: Dictionary<String, Any> = [:]
|
||||
if !language.isEmpty {
|
||||
setup["language"] = language
|
||||
@@ -223,6 +222,13 @@ open class ChatController: UIViewController, WKNavigationDelegate, WKScriptMessa
|
||||
}
|
||||
widgetUrl = "https://admin.verbox.ru/support/chat/\(id)/\(domain)"
|
||||
var url = URL(string: widgetUrl)
|
||||
if url == nil {
|
||||
var encodeDomain = String(describing: domain.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed))
|
||||
encodeDomain = encodeDomain.replacingOccurrences(of: "Optional(\"", with: "")
|
||||
encodeDomain = encodeDomain.replacingOccurrences(of: "\")", with: "")
|
||||
widgetUrl = "https://admin.verbox.ru/support/chat/\(id)/\(encodeDomain)"
|
||||
url = URL(string: widgetUrl)
|
||||
}
|
||||
var urlComponents = URLComponents(url: url!, resolvingAgainstBaseURL: false)
|
||||
if !setup.isEmpty {
|
||||
if (showCloseButton) {
|
||||
|
||||
Reference in New Issue
Block a user