|
@@ -157,6 +157,8 @@ public class Nexilis: NSObject {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
+ getServiceBank()
|
|
|
+ getPullWorkingArea()
|
|
|
delegate.onSuccess(userId: me)
|
|
|
if showButton {
|
|
|
DispatchQueue.main.async {
|
|
@@ -193,6 +195,44 @@ public class Nexilis: NSObject {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private static func getServiceBank() {
|
|
|
+ DispatchQueue.global().asyncAfter(deadline: .now(), execute: {
|
|
|
+ _ = Nexilis.write(message: CoreMessage_TMessageBank.getServiceBank())
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ private static func getPullWorkingArea() {
|
|
|
+ DispatchQueue.global().asyncAfter(deadline: .now(), execute: {
|
|
|
+ if let response = Nexilis.writeSync(message: CoreMessage_TMessageBank.getWorkingAreaContactCenter(), timeout: 30 * 1000), response.isOk() {
|
|
|
+ let data = response.getBody(key: CoreMessage_TMessageKey.DATA)
|
|
|
+ if !data.isEmpty {
|
|
|
+ if let jsonArray = try! JSONSerialization.jsonObject(with: data.data(using: String.Encoding.utf8)!, options: JSONSerialization.ReadingOptions()) as? [AnyObject] {
|
|
|
+ Database.shared.database?.inTransaction({ (fmdb, rollback) in
|
|
|
+ do {
|
|
|
+ for json in jsonArray {
|
|
|
+ var parent = CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.PARENT_ID)
|
|
|
+ if parent.isEmpty {
|
|
|
+ parent = "-99"
|
|
|
+ }
|
|
|
+ _ = try Database.shared.insertRecord(fmdb: fmdb, table: "SERVICE_BANK", cvalues: [
|
|
|
+ "service_id" : CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.CATEGORY_ID),
|
|
|
+ "service_name" : CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.NAME),
|
|
|
+ "description" : CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.DESCRIPTION),
|
|
|
+ "parent" : parent,
|
|
|
+ "is_tablet" : CoreMessage_TMessageUtil.getString(json: json, key: CoreMessage_TMessageKey.PLATFORM)
|
|
|
+ ], replace: true)
|
|
|
+ }
|
|
|
+ } catch {
|
|
|
+ rollback.pointee = true
|
|
|
+ print(error)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
public static func destroyAll() {
|
|
|
let onGoingCC = UserDefaults.standard.string(forKey: "onGoingCC") ?? ""
|
|
|
if !onGoingCC.isEmpty {
|
|
@@ -263,7 +303,7 @@ public class Nexilis: NSObject {
|
|
|
Nexilis.dispatch?.wait()
|
|
|
Nexilis.dispatch = nil
|
|
|
print("success change user to fpin")
|
|
|
- _ = Nexilis.write(message: CoreMessage_TMessageBank.getChangeConnectionID(p_pin: f_pin))
|
|
|
+// _ = Nexilis.write(message: CoreMessage_TMessageBank.getChangeConnectionID(p_pin: f_pin))
|
|
|
} catch{
|
|
|
print(error)
|
|
|
}
|
|
@@ -422,6 +462,20 @@ public class Nexilis: NSObject {
|
|
|
}
|
|
|
return result
|
|
|
}
|
|
|
+
|
|
|
+ public static func responseString(packetId: String, message: String, timeout: Int = 15 * 1000) -> String? {
|
|
|
+ var result: String? = nil
|
|
|
+ do {
|
|
|
+ if !API.bInetConnAvailable() {
|
|
|
+ return nil
|
|
|
+ }
|
|
|
+ print(">> RESPONSE >> " + packetId + " " + message);
|
|
|
+ result = try API.sSendResponse(sRequestID: packetId, sResponse: message, lTimeout: timeout)
|
|
|
+ } catch {
|
|
|
+ print(error)
|
|
|
+ }
|
|
|
+ return result
|
|
|
+ }
|
|
|
|
|
|
public static func setSpeaker(_ isEnabled: Bool) {
|
|
|
do {
|
|
@@ -1390,6 +1444,9 @@ extension Nexilis: CallDelegate {
|
|
|
let idMe = UserDefaults.standard.string(forKey: "me")!
|
|
|
let myData = User.getData(pin: idMe)
|
|
|
let onGoingCC = UserDefaults.standard.string(forKey: "onGoingCC") ?? ""
|
|
|
+ if !onGoingCC.isEmpty {
|
|
|
+ return
|
|
|
+ }
|
|
|
let deviceId = message.split(separator: ",")[0]
|
|
|
if myData?.offline_mode == "1" || self.stateUnfriend == deviceId {
|
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
|
|
@@ -1418,55 +1475,39 @@ extension Nexilis: CallDelegate {
|
|
|
}
|
|
|
}
|
|
|
if (state == 21 && message.split(separator: ",")[1] != "joining Ac.room on channel 0") {
|
|
|
- if onGoingCC.isEmpty {
|
|
|
- let data = User.getDataCanNil(pin: String(deviceId))
|
|
|
- if data == nil {
|
|
|
- DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
|
|
|
- API.terminateCall(sParty: nil)
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
+ let data = User.getDataCanNil(pin: String(deviceId))
|
|
|
+ if data == nil {
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
|
|
|
+ API.terminateCall(sParty: nil)
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
// let backgroundTaskIdentifier = UIApplication.shared.beginBackgroundTask(expirationHandler: nil)
|
|
|
// uuidOngoing = UUID()
|
|
|
// self.displayIncomingCall(uuid: uuidOngoing, handle: String(deviceId), hasVideo: false) { error in
|
|
|
// UIApplication.shared.endBackgroundTask(backgroundTaskIdentifier)
|
|
|
// }
|
|
|
- let controller = QmeraAudioViewController()
|
|
|
- controller.user = User.getData(pin: String(deviceId))
|
|
|
- controller.isOutgoing = false
|
|
|
- controller.modalPresentationStyle = .overCurrentContext
|
|
|
- if UIApplication.shared.visibleViewController is UIAlertController {
|
|
|
- let vc = UIApplication.shared.visibleViewController as! UIAlertController
|
|
|
- vc.dismiss(animated: true, completion: {
|
|
|
- if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
- UIApplication.shared.visibleViewController?.navigationController?.present(controller, animated: true, completion: nil)
|
|
|
- } else {
|
|
|
- UIApplication.shared.visibleViewController?.present(controller, animated: true, completion: nil)
|
|
|
- }
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
- UIApplication.shared.visibleViewController?.navigationController?.present(controller, animated: true, completion: nil)
|
|
|
- } else {
|
|
|
- UIApplication.shared.visibleViewController?.present(controller, animated: true, completion: nil)
|
|
|
- }
|
|
|
-// API.receiveCCall(sParty: String(deviceId))
|
|
|
- } else {
|
|
|
- DispatchQueue.main.asyncAfter(deadline: .now() + isShowAlert!, execute: {
|
|
|
- let controller = QmeraAudioViewController()
|
|
|
- controller.user = User.getData(pin: String(deviceId))
|
|
|
- controller.isOnGoing = true
|
|
|
- controller.isOutgoing = false
|
|
|
- controller.modalPresentationStyle = .overCurrentContext
|
|
|
+ let controller = QmeraAudioViewController()
|
|
|
+ controller.user = User.getData(pin: String(deviceId))
|
|
|
+ controller.isOutgoing = false
|
|
|
+ controller.modalPresentationStyle = .overCurrentContext
|
|
|
+ if UIApplication.shared.visibleViewController is UIAlertController {
|
|
|
+ let vc = UIApplication.shared.visibleViewController as! UIAlertController
|
|
|
+ vc.dismiss(animated: true, completion: {
|
|
|
if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
UIApplication.shared.visibleViewController?.navigationController?.present(controller, animated: true, completion: nil)
|
|
|
} else {
|
|
|
UIApplication.shared.visibleViewController?.present(controller, animated: true, completion: nil)
|
|
|
}
|
|
|
- API.receiveCCall(sParty: String(deviceId))
|
|
|
})
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(controller, animated: true, completion: nil)
|
|
|
+ } else {
|
|
|
+ UIApplication.shared.visibleViewController?.present(controller, animated: true, completion: nil)
|
|
|
}
|
|
|
+// API.receiveCCall(sParty: String(deviceId))
|
|
|
} else if state == 31 {
|
|
|
let dataUser = User.getDataCanNil(pin: String(deviceId))
|
|
|
if dataUser == nil {
|
|
@@ -1475,74 +1516,27 @@ extension Nexilis: CallDelegate {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- let fpin = deviceId
|
|
|
- var data: [String: String?] = [:]
|
|
|
- Database.shared.database?.inTransaction({ (fmdb, rollback) in
|
|
|
- if let cursorData = Database.shared.getRecords(fmdb: fmdb, query: "SELECT f_pin, first_name, last_name, official_account, image_id, device_id, offline_mode, user_type FROM BUDDY where f_pin = '\(fpin)'"), cursorData.next() {
|
|
|
- data["f_pin"] = cursorData.string(forColumnIndex: 0)
|
|
|
- var name = ""
|
|
|
- if let firstname = cursorData.string(forColumnIndex: 1) {
|
|
|
- name = firstname
|
|
|
- }
|
|
|
- if let lastname = cursorData.string(forColumnIndex: 2) {
|
|
|
- name = name + " " + lastname
|
|
|
- }
|
|
|
- data["name"] = name
|
|
|
- data["picture"] = cursorData.string(forColumnIndex: 4)
|
|
|
- data["isOfficial"] = cursorData.string(forColumnIndex: 3)
|
|
|
- data["deviceId"] = cursorData.string(forColumnIndex: 5)
|
|
|
- data["isOffline"] = cursorData.string(forColumnIndex: 6)
|
|
|
- data["user_type"] = cursorData.string(forColumnIndex: 7)
|
|
|
- cursorData.close()
|
|
|
-
|
|
|
- let videoController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "videoVCQmera") as! QmeraVideoViewController
|
|
|
- videoController.dataPerson.append(data)
|
|
|
- videoController.isInisiator = false
|
|
|
- if !onGoingCC.isEmpty {
|
|
|
- videoController.users.append(User.getData(pin: data["f_pin"]!!, fmdb: fmdb)!)
|
|
|
- }
|
|
|
- let navigationController = UINavigationController(rootViewController: videoController)
|
|
|
- navigationController.modalPresentationStyle = .fullScreen
|
|
|
- if !onGoingCC.isEmpty {
|
|
|
- videoController.isAutoAccept = true
|
|
|
- DispatchQueue.main.asyncAfter(deadline: .now() + isShowAlert!, execute: {
|
|
|
- if UIApplication.shared.visibleViewController is UIAlertController {
|
|
|
- let vc = UIApplication.shared.visibleViewController as! UIAlertController
|
|
|
- vc.dismiss(animated: true, completion: {
|
|
|
- if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
- UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
- } else {
|
|
|
- UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
- }
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
- UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
- } else {
|
|
|
- UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
- }
|
|
|
- })
|
|
|
+ let videoController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "videoVCQmera") as! QmeraVideoViewController
|
|
|
+ videoController.fPin = String(deviceId)
|
|
|
+ videoController.isInisiator = false
|
|
|
+ let navigationController = UINavigationController(rootViewController: videoController)
|
|
|
+ navigationController.modalPresentationStyle = .fullScreen
|
|
|
+ if UIApplication.shared.visibleViewController is UIAlertController {
|
|
|
+ let vc = UIApplication.shared.visibleViewController as! UIAlertController
|
|
|
+ vc.dismiss(animated: true, completion: {
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
} else {
|
|
|
- if UIApplication.shared.visibleViewController is UIAlertController {
|
|
|
- let vc = UIApplication.shared.visibleViewController as! UIAlertController
|
|
|
- vc.dismiss(animated: true, completion: {
|
|
|
- if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
- UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
- } else {
|
|
|
- UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
- }
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
- UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
- } else {
|
|
|
- UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
- }
|
|
|
+ UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ } else {
|
|
|
+ UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1579,6 +1573,7 @@ extension Nexilis: CallDelegate {
|
|
|
}
|
|
|
|
|
|
var previewItem : NSURL?
|
|
|
+var listCCIdInv: [String] = []
|
|
|
|
|
|
extension Nexilis: MessageDelegate {
|
|
|
public func onReceiveComment(message: TMessage) {
|
|
@@ -1847,6 +1842,10 @@ extension Nexilis: MessageDelegate {
|
|
|
dataMessage["message"] = message
|
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "onReceiveChat"), object: nil, userInfo: dataMessage)
|
|
|
if message.getCode() == CoreMessage_TMessageCode.PUSH_CALL_CENTER {
|
|
|
+ if User.getDataCanNil(pin: message.getBody(key: CoreMessage_TMessageKey.L_PIN)) == nil {
|
|
|
+ Nexilis.addFriendSilent(fpin: message.getBody(key: CoreMessage_TMessageKey.L_PIN))
|
|
|
+ sleep(1)
|
|
|
+ }
|
|
|
DispatchQueue.main.async {
|
|
|
if Nexilis.onGoingPushCC.isEmpty {
|
|
|
var data: [String: String] = [:]
|
|
@@ -1896,6 +1895,7 @@ extension Nexilis: MessageDelegate {
|
|
|
DispatchQueue.global().async {
|
|
|
DispatchQueue.global().async {
|
|
|
_ = Nexilis.write(message: CoreMessage_TMessageBank.timeOutRequestCallCenter(channel: message.getBody(key: CoreMessage_TMessageKey.CHANNEL), l_pin: message.getBody(key: CoreMessage_TMessageKey.L_PIN)))
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
Nexilis.onGoingPushCC.removeAll()
|
|
@@ -2041,6 +2041,7 @@ extension Nexilis: MessageDelegate {
|
|
|
let controller = QmeraAudioViewController()
|
|
|
controller.user = User.getData(pin: pin)
|
|
|
controller.isOutgoing = true
|
|
|
+ controller.ticketId = complaintId
|
|
|
controller.modalPresentationStyle = .overCurrentContext
|
|
|
let navigationController = UINavigationController(rootViewController: controller)
|
|
|
navigationController.modalPresentationStyle = .fullScreen
|
|
@@ -2053,6 +2054,7 @@ extension Nexilis: MessageDelegate {
|
|
|
let videoVC = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "videoVCQmera") as! QmeraVideoViewController
|
|
|
videoVC.fPin = message.getBody(key: CoreMessage_TMessageKey.L_PIN)
|
|
|
videoVC.users.append(User.getData(pin: message.getBody(key: CoreMessage_TMessageKey.L_PIN))!)
|
|
|
+ videoVC.ticketId = complaintId
|
|
|
let navigationController = UINavigationController(rootViewController: videoVC)
|
|
|
navigationController.modalPresentationStyle = .fullScreen
|
|
|
if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
@@ -2209,6 +2211,10 @@ extension Nexilis: MessageDelegate {
|
|
|
UserDefaults.standard.set("\(fPinContacCenter)", forKey: "membersCC")
|
|
|
}
|
|
|
} else if message.getCode() == CoreMessage_TMessageCode.INVITE_TO_ROOM_CONTACT_CENTER {
|
|
|
+ if listCCIdInv.contains(message.getBody(key: CoreMessage_TMessageKey.CALL_CENTER_ID)) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ listCCIdInv.append(message.getBody(key: CoreMessage_TMessageKey.CALL_CENTER_ID))
|
|
|
DispatchQueue.main.async {
|
|
|
let alert = UIAlertController(title: "", message: "\n\n\n\n\n\n\n\n\n\n".localized(), preferredStyle: .alert)
|
|
|
let newWidth = UIScreen.main.bounds.width * 0.90 - 270
|
|
@@ -2226,6 +2232,7 @@ extension Nexilis: MessageDelegate {
|
|
|
alert.view.subviews.first?.subviews.first?.subviews.first?.backgroundColor = .lightGray
|
|
|
alert.view.tintColor = .black
|
|
|
let rejectAction = UIAlertAction(title: "Reject".localized(), style: .destructive, handler: {(_) in
|
|
|
+ listCCIdInv.removeAll(where: {$0 == message.getBody(key: CoreMessage_TMessageKey.CALL_CENTER_ID)})
|
|
|
DispatchQueue.global().async {
|
|
|
if let result = Nexilis.writeSync(message: CoreMessage_TMessageBank.acceptCCRoomInvite(l_pin: message.getPIN(), type: 0, ticket_id: message.getBody(key: CoreMessage_TMessageKey.CALL_CENTER_ID))) {
|
|
|
if result.isOk() {
|
|
@@ -2236,6 +2243,7 @@ extension Nexilis: MessageDelegate {
|
|
|
alert.dismiss(animated: true, completion: nil)
|
|
|
})
|
|
|
let acceptAction = UIAlertAction(title: "Accept".localized(), style: .default, handler: {(_) in
|
|
|
+ listCCIdInv.removeAll(where: {$0 == message.getBody(key: CoreMessage_TMessageKey.CALL_CENTER_ID)})
|
|
|
let goAudioCall = Nexilis.checkMicPermission()
|
|
|
if !goAudioCall && message.getBody(key: CoreMessage_TMessageKey.CHANNEL) == "1" {
|
|
|
let alert = UIAlertController(title: "Attention!".localized(), message: "Please allow microphone permission in your settings".localized(), preferredStyle: .alert)
|
|
@@ -2384,19 +2392,12 @@ extension Nexilis: MessageDelegate {
|
|
|
if let userData = User.getData(pin: "\(json)") {
|
|
|
user.append(userData)
|
|
|
} else {
|
|
|
- Nexilis.addFriend (fpin: "\(json)") { result in
|
|
|
- DispatchQueue.main.async {
|
|
|
- if result {
|
|
|
- let userData = User.getData(pin: "\(json)")!
|
|
|
- user.append(userData)
|
|
|
- } else {
|
|
|
- let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
|
|
|
- imageView.tintColor = .white
|
|
|
- let banner = FloatingNotificationBanner(title: "Server busy, please try again later".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .danger, colors: nil, iconPosition: .center)
|
|
|
- banner.show()
|
|
|
- }
|
|
|
+ Nexilis.addFriendSilent(fpin: "\(json)")
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
|
|
|
+ if let userData = User.getData(pin: "\(json)") {
|
|
|
+ user.append(userData)
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2429,6 +2430,39 @@ extension Nexilis: MessageDelegate {
|
|
|
} else {
|
|
|
UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
}
|
|
|
+ } else {
|
|
|
+ UserDefaults.standard.set("\(Date().currentTimeMillis())", forKey: "startTimeCC")
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
|
|
|
+ if message.getBody(key: CoreMessage_TMessageKey.CHANNEL) == "1" {
|
|
|
+ let pin = officer
|
|
|
+ let controller = QmeraAudioViewController()
|
|
|
+ controller.user = User.getData(pin: pin)
|
|
|
+ controller.isOutgoing = false
|
|
|
+ controller.ticketId = complaintId
|
|
|
+ controller.modalPresentationStyle = .overCurrentContext
|
|
|
+ let navigationController = UINavigationController(rootViewController: controller)
|
|
|
+ navigationController.modalPresentationStyle = .fullScreen
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ } else {
|
|
|
+ UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ }
|
|
|
+ } else if message.getBody(key: CoreMessage_TMessageKey.CHANNEL) == "2" {
|
|
|
+ let videoVC = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "videoVCQmera") as! QmeraVideoViewController
|
|
|
+ videoVC.fPin = officer
|
|
|
+ videoVC.users.append(User.getData(pin: officer)!)
|
|
|
+ videoVC.ticketId = complaintId
|
|
|
+ videoVC.isInisiator = false
|
|
|
+ videoVC.isAutoAccept = true
|
|
|
+ let navigationController = UINavigationController(rootViewController: videoVC)
|
|
|
+ navigationController.modalPresentationStyle = .fullScreen
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ } else {
|
|
|
+ UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -3060,6 +3094,12 @@ extension Nexilis: MessageDelegate {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static func addFriendSilent(fpin: String) {
|
|
|
+ DispatchQueue.global().async {
|
|
|
+ _ = Nexilis.write(message: CoreMessage_TMessageBank.getAddFriendQRCodeSilent(fpin: fpin))
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public func onReceive(message: [AnyHashable : Any?]) {
|
|
|
var dataMessage: [AnyHashable : Any] = [:]
|
|
|
dataMessage["message"] = message
|