diff options
author | George Hazan <ghazan@miranda.im> | 2022-06-07 22:26:51 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-06-07 22:26:51 +0300 |
commit | 36f4c7318b1fa7f8cb7f8e5745c7c0ffd76f2d6f (patch) | |
tree | d6a2d3f497e7167a6084b258905d58bf8a64255e | |
parent | cff1f990ef50f93c37551cb1e2375457e7a235e0 (diff) |
Jabber: we use IsSendAck everywhere
-rw-r--r-- | protocols/JabberG/src/jabber_misc.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_notes.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_thread.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index b73a2dba93..9083b8c9e3 100644 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -477,7 +477,7 @@ void CJabberProto::OnGetBob(const TiXmlElement *node, CJabberIqInfo *pReq) {
auto *pMark = ((CChatMark *)pReq->GetUserData());
if (pMark) {
- if (m_bMsgAck) {
+ if (IsSendAck(HContactFromJID(pMark->szFrom))) {
XmlNode reply("message"); reply << XATTR("to", pMark->szFrom) << XATTR("id", pMark->szId)
<< XCHILDNS("displayed", JABBER_FEAT_CHAT_MARKERS) << XATTR("id", pMark->szId);
m_ThreadInfo->send(reply);
diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index e5015bb4c6..49ca3d8010 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -686,7 +686,7 @@ void CJabberProto::ProcessOutgoingNote(CNoteItem *pNote, bool ok) hXmlItem << XCHILD("text", T2Utf(pNote->GetText()));
// message receipts XEP priority
- if (m_bMsgAck && (jcb & JABBER_CAPS_MESSAGE_RECEIPTS))
+ if (IsSendAck(HContactFromJID(pNote->GetFrom())) && (jcb & JABBER_CAPS_MESSAGE_RECEIPTS))
m << XCHILDNS("request", JABBER_FEAT_MESSAGE_RECEIPTS);
else
nMsgId = -1;
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 7c0376aa13..8bead26b61 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1059,7 +1059,7 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info) pResourceStatus pFromResource(ResourceInfoFromJID(from));
// Message receipts delivery request. Reply here, before a call to HandleMessagePermanent() to make sure message receipts are handled for external plugins too.
- if (m_bMsgAck && bEnableDelivery && (!type || mir_strcmpi(type, "error"))) {
+ if (IsSendAck(HContactFromJID(from)) && bEnableDelivery && (!type || mir_strcmpi(type, "error"))) {
bool bSendReceipt = XmlGetChildByTag(node, "request", "xmlns", JABBER_FEAT_MESSAGE_RECEIPTS) != 0;
bool bSendMark = XmlGetChildByTag(node, "markable", "xmlns", JABBER_FEAT_CHAT_MARKERS) != 0;
if (bSendReceipt || bSendMark) {
|