summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-12 22:42:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-12 22:42:56 +0300
commitc88b18efc8b4b3a84cac866dc9de4f424a05dbcb (patch)
tree379a761002809e4dc725c185ccdf914edb65ea8b
parentadad151967363c037c0bd8027d53f72dd5064770 (diff)
ICQ-WIM: we simply read the tail, when the polling cycle is executed
-rw-r--r--protocols/ICQ-WIM/src/poll.cpp11
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