diff options
author | George Hazan <ghazan@miranda.im> | 2020-02-12 20:54:14 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-02-12 20:54:14 +0300 |
commit | 42a03d4adb5227e88bda12520240add9597446a8 (patch) | |
tree | 6e3a5707d95d57ff01058b917b3a1c4e7739b256 /protocols/JabberG | |
parent | c64e697b69c0c36c034f00683011894b7a41efea (diff) |
Jabber: message state is set when a message is displayed
Diffstat (limited to 'protocols/JabberG')
-rwxr-xr-x | protocols/JabberG/src/jabber_thread.cpp | 12 |
1 files 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);
|