From 6c9dd61fd8a14259ba125ebf3f69a36bf05199e6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 8 Aug 2024 20:25:52 +0300 Subject: SkypeWeb: fix for group chat message fetching --- protocols/SkypeWeb/src/skype_history_sync.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index e1f427c6ee..e535374d2e 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -112,7 +112,17 @@ void CSkypeProto::OnSyncConversations(MHttpResponse *response, AsyncHttpRequest* int iUserType; std::string strConversationLink = lastMessage["conversationLink"].as_string(); CMStringA szSkypename = UrlToSkypeId(strConversationLink.c_str(), &iUserType); - if (iUserType == 8 || iUserType == 2) { + switch (iUserType) { + case 19: + { + auto &props = it["threadProperties"]; + if (props["members"] && !props["lastleaveat"]) + StartChatRoom(it["id"].as_mstring(), props["topic"].as_mstring()); + } + __fallthrough; + + case 8: + case 2: int64_t id = _atoi64(lastMessage["id"].as_string().c_str()); MCONTACT hContact = FindContact(szSkypename); @@ -122,11 +132,6 @@ void CSkypeProto::OnSyncConversations(MHttpResponse *response, AsyncHttpRequest* PushRequest(new GetHistoryRequest(hContact, szSkypename, 100, lastMsgTime, true)); } } - else if (iUserType == 19) { - auto &props = it["threadProperties"]; - if (props["members"] && !props["lastleaveat"]) - StartChatRoom(it["id"].as_mstring(), props["topic"].as_mstring()); - } } m_bHistorySynced = true; -- cgit v1.2.3