From c88b18efc8b4b3a84cac866dc9de4f424a05dbcb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 12 Mar 2019 22:42:56 +0300 Subject: ICQ-WIM: we simply read the tail, when the polling cycle is executed --- protocols/ICQ-WIM/src/poll.cpp | 11 +++-------- 1 file 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 -- cgit v1.2.3