summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-03-13 17:52:35 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-03-13 17:52:35 +0300
commit22e7d00f90ca3f6c168a0b0d2000695bf7511ec0 (patch)
treeb3013cd15d69111b403f05121bce12a159356804
parent01fd46751173995ffa83fbef0513b8adbf1e3b86 (diff)
Jabber: if another side doesn't support receipts, don't trust on them
-rwxr-xr-xprotocols/JabberG/src/jabber_proto.cpp6
1 files changed, 5 insertions, 1 deletions
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)))