diff options
author | George Hazan <ghazan@miranda.im> | 2019-03-12 22:42:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-03-12 22:42:56 +0300 |
commit | c88b18efc8b4b3a84cac866dc9de4f424a05dbcb (patch) | |
tree | 379a761002809e4dc725c185ccdf914edb65ea8b | |
parent | adad151967363c037c0bd8027d53f72dd5064770 (diff) |
ICQ-WIM: we simply read the tail, when the polling cycle is executed
-rw-r--r-- | protocols/ICQ-WIM/src/poll.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/protocols/ICQ-WIM/src/poll.cpp b/protocols/ICQ-WIM/src/poll.cpp index 7004af5716..c42bb10b93 100644 --- a/protocols/ICQ-WIM/src/poll.cpp +++ b/protocols/ICQ-WIM/src/poll.cpp @@ -163,14 +163,9 @@ void CIcqProto::ProcessHistData(const JSONNode &ev) RetrieveUserHistory(hContact, lastMsgId); } else { - // if the previous message is one that we already have, just parse the tail - __int64 srvOlderId = _wtoi64(ev["tail"]["olderMsgId"].as_mstring()); - if (srvOlderId == lastMsgId) { - for (auto &it : ev["tail"]["messages"]) - ParseMessage(hContact, lastMsgId, it, false); - setId(hContact, DB_KEY_LASTMSGID, lastMsgId); - } - else RetrieveUserHistory(hContact, lastMsgId); + for (auto &it : ev["tail"]["messages"]) + ParseMessage(hContact, lastMsgId, it, false); + setId(hContact, DB_KEY_LASTMSGID, lastMsgId); } // check remote read |