Untitled

mail@pastecode.io avatar
unknown
swift
3 years ago
1.6 kB
87
Indexable
Never
if AppDefaults.shared.userTYPE == 1 {
            SocketIOManager.shared.socket.emit("\(self.sendMessageName)",
                                               ["authToken":AppDefaults.shared.userJWT_Token,
                                                "groupId":self.groupID ?? "",
                                                "type": 1,
                                                "message": chatInputTextView.text ?? "",
                                                "userType": "user",
                                                "receiverId":self.recvrID,
                                                "bookingId":self.orderId,
                                                "senderId":AppDefaults.shared.userID,
                                                "chatType":"2"])
        } else {
            SocketIOManager.shared.socket.emit("\(self.sendMessageName)",
                                               ["authToken":AppDefaults.shared.userJWT_Token,
                                                "groupId":self.groupID ?? "",
                                                "type": 1,
                                                "message": chatInputTextView.text ?? "",
                                                "userType": "professional",
                                                "receiverId":self.recvrID,
                                                "bookingId":self.orderId,
                                                "senderId":AppDefaults.shared.userID,
                                                "chatType":"2"])