From 7b6735c0e81cedc8146dfae510f14a5cf5a26528 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 10 Mar 2021 22:28:42 +0300 Subject: Jabber: fix for reading OMEMO encrypted messages --- protocols/JabberG/src/jabber_thread.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'protocols') diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 1682a03421..d1e00a7be4 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1272,13 +1272,10 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info) for (auto *xNode : TiXmlEnum(node)) { if (m_bUseOMEMO) { if (!mir_strcmp(xNode->Name(), "encrypted") && xNode->Attribute("xmlns", JABBER_FEAT_OMEMO)) { - const char *jid = XmlGetAttr(xNode, "from"); - if (jid) { - if (!OmemoHandleMessage(xNode, jid, msgTime)) - OmemoPutMessageToIncommingQueue(xNode, jid, msgTime); - debugLogA("OMEMO processing finished, returning"); - return; //we do not want any additional processing - } + if (!OmemoHandleMessage(xNode, from, msgTime)) + OmemoPutMessageToIncommingQueue(xNode, from, msgTime); + debugLogA("OMEMO processing finished, returning"); + return; //we do not want any additional processing } } -- cgit v1.2.3