summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-04-20 16:22:54 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-04-20 16:22:54 +0300
commit4402462877c2a547e758e3ea422afe85e3d6f53a (patch)
treed8367be05e2bdd09d07704b71761fea39822c623
parentb2b87ef6045f6634c3151233b18d2186f77277bf (diff)
no money, no honey (no OMEMO - no queries)
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp3
-rw-r--r--protocols/JabberG/src/jabber_omemo.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index 0aafde4364..4201abd31b 100644
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -1129,6 +1129,9 @@ void CJabberProto::OnIqResultSetVcard(const TiXmlElement *iqNode, CJabberIqInfo*
void CJabberProto::OnIqResultGetOmemodevicelist(const TiXmlElement* iqNode, CJabberIqInfo*)
{
+ if (!m_bUseOMEMO)
+ return;
+
const char *from = XmlGetAttr(iqNode, "from"); //replies for our jid don't contain "from"
bool res = false;
if (auto *pubsubNode = XmlGetChildByTag(iqNode, "pubsub", "xmlns", JABBER_FEAT_PUBSUB))
diff --git a/protocols/JabberG/src/jabber_omemo.cpp b/protocols/JabberG/src/jabber_omemo.cpp
index 267f5f8608..d67ad88558 100644
--- a/protocols/JabberG/src/jabber_omemo.cpp
+++ b/protocols/JabberG/src/jabber_omemo.cpp
@@ -1726,7 +1726,7 @@ bool CJabberProto::OmemoCheckSession(MCONTACT hContact)
void CJabberProto::OmemoOnIqResultGetBundle(const TiXmlElement *iqNode, CJabberIqInfo *)
{
- if (iqNode == nullptr)
+ if (iqNode == nullptr || !m_bUseOMEMO)
return;
const char *jid = XmlGetAttr(iqNode, "from");