|
|
|
|
@ -217,7 +217,7 @@ class ChatProvider with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
|
chatHubConnection = await getHubConnection();
|
|
|
|
|
await chatHubConnection.start();
|
|
|
|
|
if (kDebugMode) {
|
|
|
|
|
// logger.i("Hub Conn: Startedddddddd");
|
|
|
|
|
print("Hub Conn: Startedddddddd");
|
|
|
|
|
}
|
|
|
|
|
// chatHubConnection.on("OnDeliveredChatUserAsync", onMsgReceived);
|
|
|
|
|
// chatHubConnection.on("OnGetChatConversationCount", onNewChatConversion);
|
|
|
|
|
@ -231,7 +231,7 @@ class ChatProvider with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
|
HubConnection hub;
|
|
|
|
|
HttpConnectionOptions httpOp = HttpConnectionOptions(skipNegotiation: false, logMessageContent: true);
|
|
|
|
|
hub = HubConnectionBuilder()
|
|
|
|
|
.withUrl(URLs.chatHubUrlChat + "?UserId=AppState().chatDetails!.response!.id&source=Desktop&access_token=AppState().chatDetails!.response!.token", options: httpOp)
|
|
|
|
|
.withUrl("${URLs.chatHubUrl}?UserId=${chatLoginResponse!.userId}&source=Desktop&access_token=${chatLoginResponse!.token}", options: httpOp)
|
|
|
|
|
.withAutomaticReconnect(retryDelays: <int>[2000, 5000, 10000, 20000]).build();
|
|
|
|
|
return hub;
|
|
|
|
|
}
|
|
|
|
|
@ -246,7 +246,7 @@ class ChatProvider with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
|
// chatHubConnection.on("OnUpdateUserChatHistoryWindowsAsync", updateChatHistoryWindow);
|
|
|
|
|
// chatHubConnection.on("OnGetUserChatHistoryNotDeliveredAsync", chatNotDelivered);
|
|
|
|
|
// chatHubConnection.on("OnUpdateUserChatHistoryStatusAsync", updateUserChatStatus);
|
|
|
|
|
chatHubConnection.on("OnGetGroupUserStatusAsync", getGroupUserStatus);
|
|
|
|
|
// chatHubConnection.on("OnGetGroupUserStatusAsync", getGroupUserStatus);
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// {"type":1,"target":"","arguments":[[{"id":217869,"userName":"Sultan.Khan","email":"Sultan.Khan@cloudsolutions.com.sa","phone":null,"title":"Sultan.Khan","userStatus":1,"image":null,"unreadMessageCount":0,"userAction":3,"isPin":false,"isFav":false,"isAdmin":false,"rKey":null,"totalCount":0,"isHuaweiDevice":false,"deviceToken":null},{"id":15153,"userName":"Tamer.Fanasheh","email":"Tamer.F@cloudsolutions.com.sa","phone":null,"title":"Tamer Fanasheh","userStatus":2,"image":null,"unreadMessageCount":0,"userAction":3,"isPin":false,"isFav":false,"isAdmin":true,"rKey":null,"totalCount":0,"isHuaweiDevice":false,"deviceToken":null}]]}
|
|
|
|
|
|