From 42a03d4adb5227e88bda12520240add9597446a8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 12 Feb 2020 20:54:14 +0300 Subject: Jabber: message state is set when a message is displayed --- protocols/JabberG/src/jabber_thread.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index e46d5a3c9b..c3bd15f02b 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1196,15 +1196,15 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info) int nPacketId = JabberGetPacketID(n); if (nPacketId == -1) nPacketId = JabberGetPacketID(node); - if (nPacketId != -1) { + if (nPacketId != -1) ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)nPacketId, 0); + } - if (g_plugin.bMessageState) { - MessageReadData readData(time(0), MRD_TYPE_READTIME); - CallService(MS_MESSAGESTATE_UPDATE, hContact, (LPARAM)&readData); - } + if (auto *n = XmlGetChildByTag(node, "displayed", "xmlns", JABBER_FEAT_CHAT_MARKERS)) + if (g_plugin.bMessageState) { + MessageReadData readData(time(0), MRD_TYPE_READTIME); + CallService(MS_MESSAGESTATE_UPDATE, hContact, (LPARAM)&readData); } - } JabberReadXep203delay(node, msgTime); -- cgit v1.2.3