From d72c08e9da0b5aa8633e9830d6f8fda77caaa0fe Mon Sep 17 00:00:00 2001 From: sss Date: Fri, 5 Nov 2021 21:35:24 +0300 Subject: omemo: add also support for disable sending messages per contact (not only receiving) explicitly set default setting values to disable --- protocols/JabberG/src/jabber_proto.cpp | 2 +- protocols/JabberG/src/jabber_thread.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 17b4eef723..bef30e5e0c 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -887,7 +887,7 @@ int CJabberProto::SendMsg(MCONTACT hContact, int unused_unknown, const char *psz return 1; } - if (m_bUseOMEMO) { + if (m_bUseOMEMO && !getByte(hContact, "bDisableOmemo", 0)) { if (!OmemoCheckSession(hContact)) { OmemoPutMessageToOutgoingQueue(hContact, unused_unknown, pszSrc); int id = SerialNext(); diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index b23e5c61c9..aa6e78f6cd 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1261,7 +1261,7 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info) // parsing extensions for (auto *xNode : TiXmlEnum(node)) { - if (m_bUseOMEMO && !getByte(hContact, "bDisableOmemo")) { + if (m_bUseOMEMO && !getByte(hContact, "bDisableOmemo", 0)) { if (!mir_strcmp(xNode->Name(), "encrypted") && xNode->Attribute("xmlns", JABBER_FEAT_OMEMO)) { if (!OmemoHandleMessage(xNode, from, msgTime)) OmemoPutMessageToIncommingQueue(xNode, from, msgTime); -- cgit v1.2.3