From 22e7d00f90ca3f6c168a0b0d2000695bf7511ec0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 13 Mar 2020 17:52:35 +0300 Subject: Jabber: if another side doesn't support receipts, don't trust on them --- protocols/JabberG/src/jabber_proto.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index ddadc6eb34..d71378c81f 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -977,6 +977,9 @@ int CJabberProto::SendMsg(MCONTACT hContact, int unused_unknown, const char *psz m << XATTR("to", szClientJid); bool bSendReceipt = (m_bMsgAck || getByte(hContact, "MsgAck", false)); + if (bSendReceipt && jcb && !(jcb & (JABBER_CAPS_CHAT_MARKERS | JABBER_CAPS_MESSAGE_RECEIPTS))) + bSendReceipt = false; + if (bSendReceipt) { m << XCHILDNS("request", JABBER_FEAT_MESSAGE_RECEIPTS); m << XCHILDNS("markable", JABBER_FEAT_CHAT_MARKERS); @@ -1195,7 +1198,8 @@ int CJabberProto::SetAwayMsg(int status, const wchar_t *msg) int CJabberProto::UserIsTyping(MCONTACT hContact, int type) { - if (!m_bJabberOnline) return 0; + if (!m_bJabberOnline) + return 0; char szClientJid[JABBER_MAX_JID_LEN]; if (!GetClientJID(hContact, szClientJid, _countof(szClientJid))) -- cgit v1.2.3