diff options
Diffstat (limited to 'protocols/SkypeWeb/src/skype_history_sync.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_history_sync.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index a1e86c777b..e1f427c6ee 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -104,8 +104,8 @@ void CSkypeProto::OnSyncConversations(MHttpResponse *response, AsyncHttpRequest* // int totalCount = metadata["totalCount"].as_int();
std::string syncState = metadata["syncState"].as_string();
- for (auto &conversation : conversations) {
- const JSONNode &lastMessage = conversation["lastMessage"];
+ for (auto &it: conversations) {
+ const JSONNode &lastMessage = it["lastMessage"];
if (!lastMessage)
continue;
@@ -118,10 +118,15 @@ void CSkypeProto::OnSyncConversations(MHttpResponse *response, AsyncHttpRequest* MCONTACT hContact = FindContact(szSkypename);
if (hContact != NULL) {
auto lastMsgTime = getLastTime(hContact);
- if (lastMsgTime && lastMsgTime < id)
+ if (lastMsgTime && lastMsgTime < id && bAutoHistorySync)
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;
|