This commit is contained in:
Andrey Blinov
2020-08-17 16:07:57 +07:00
parent 319e2b36f4
commit a74b522e08
2 changed files with 14 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
import Foundation
class ChatConfig {
let defaults = UserDefaults.standard
}

View File

@@ -33,6 +33,14 @@ open class ChatController: UIViewController, WKNavigationDelegate, WKScriptMessa
private var didFinish: Bool = false
private var widgetUrl: String = ""
public static func getUnreadedMessages() {
}
public static func getNewMessages() {
}
override public func loadView() {
let contentController = WKUserContentController()
contentController.add(self, name: "chatInterface")
@@ -114,7 +122,7 @@ open class ChatController: UIViewController, WKNavigationDelegate, WKScriptMessa
return "{}"
}
public func load(_ id: String, _ domain: String, _ language: String = "", _ clientId: String = "") {
public func load(_ id: String, _ domain: String, _ language: String = "", _ clientId: String = "", _ apiToken: String = "") {
var setup: Dictionary<String, Any> = [:]
if !language.isEmpty {
setup["language"] = language