summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-08-08 20:25:52 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-08-08 20:25:52 +0300
commit6c9dd61fd8a14259ba125ebf3f69a36bf05199e6 (patch)
tree829baceb0997ad9834ab97a2d9dd5ce48f32a76c /protocols/SkypeWeb/src
parente6b307560c6d58d8c1e7b960c2d41d759947b2e2 (diff)
SkypeWeb: fix for group chat message fetching
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r--protocols/SkypeWeb/src/skype_history_sync.cpp17
1 files 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;