From e56bbe53cd07402970fc9015a832566f85cd890b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 6 Feb 2020 20:30:18 +0300 Subject: Jabber: - MessageState support; - minor code cleaning --- protocols/JabberG/src/jabber_thread.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'protocols/JabberG/src/jabber_thread.cpp') diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 82a56adbbf..18cd3d03fb 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1185,8 +1185,14 @@ 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); + } + } } JabberReadXep203delay(node, msgTime); -- cgit v1.2.3