diff options
author | George Hazan <ghazan@miranda.im> | 2020-04-15 12:17:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-04-15 12:17:48 +0300 |
commit | d508438914735fa7e39d57b90f11cacf6b30d5bc (patch) | |
tree | 98ee734a3e19b5b1cd413bed3ba160c0bb6a9988 /protocols/ICQ-WIM | |
parent | 01e6deb9cea4734e3da3701e35305eb061db72ee (diff) |
ICQ: more logs
Diffstat (limited to 'protocols/ICQ-WIM')
-rw-r--r-- | protocols/ICQ-WIM/src/poll.cpp | 4 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/protocols/ICQ-WIM/src/poll.cpp b/protocols/ICQ-WIM/src/poll.cpp index f6072bdf0f..4d93f15c65 100644 --- a/protocols/ICQ-WIM/src/poll.cpp +++ b/protocols/ICQ-WIM/src/poll.cpp @@ -202,8 +202,10 @@ void CIcqProto::ProcessHistData(const JSONNode &ev) // we load history in the very beginning or if the previous message if (m_bFirstBos) { __int64 srvLastId = _wtoi64(ev["lastMsgId"].as_mstring()); - if (srvLastId > lastMsgId) + if (srvLastId > lastMsgId) { + debugLogA("We need to retrieve history for %S: %lld > %lld", wszId.c_str(), srvLastId, lastMsgId); RetrieveUserHistory(hContact, lastMsgId, false); + } } else { for (auto &it : ev["tail"]["messages"]) diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index a89af9c2f0..96920310f9 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -416,8 +416,10 @@ void CIcqProto::ParseMessage(MCONTACT hContact, __int64 &lastMsgId, const JSONNo // ignore duplicates MEVENT hDbEvent = db_event_getById(m_szModuleName, szMsgId); - if (hDbEvent != 0) + if (hDbEvent != 0) { + debugLogA("Message %s already exists", szMsgId.c_str()); return; + } bool bIsOutgoing = it["outgoing"].as_bool(); if (!bFromHistory && !bIsOutgoing && wszText.Left(26) == L"https://files.icq.net/get/") { @@ -438,6 +440,8 @@ void CIcqProto::ParseMessage(MCONTACT hContact, __int64 &lastMsgId, const JSONNo return; } + debugLogA("Adding message %d:%s (%d)", hContact, szMsgId.c_str(), bFromHistory); + ptrA szUtf(mir_utf8encodeW(wszText)); PROTORECVEVENT pre = {}; |