summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-01-22 18:45:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-01-22 18:45:03 +0300
commitf5980308df254aa17a9f5d94a980fb888b6c193f (patch)
treeaef7687271fc705ea2a716059a341aae663b090f
parent947d78753fab95f39bc3487970bdb1ceb1914a0c (diff)
fixes #1770 (ICQ10: on each login a bunch of old keys appear as messages)
-rw-r--r--protocols/ICQ-WIM/src/server.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index 097f17fa4d..dfe5639cc8 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -60,9 +60,16 @@ MCONTACT CIcqProto::CheckOwnMessage(const CMStringA &reqId, const CMStringA &msg
for (auto &own: m_arOwnIds) {
if (!mir_strcmp(reqId, own->m_guid)) {
ProtoBroadcastAck(own->m_hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)own->m_msgid, (LPARAM)msgId.c_str());
+
MCONTACT ret = own->m_hContact;
- if (bRemove)
+ if (bRemove) {
+ // here we filter service messages for SecureIM, OTR etc, i.e. messages that
+ // weren't initialized by SRMM (we identify it by missing server id)
+ if (db_event_getById(m_szModuleName, msgId) == 0)
+ db_event_setId(m_szModuleName, 1, msgId);
+
m_arOwnIds.remove(m_arOwnIds.indexOf(&own));
+ }
return ret;
}
}