summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsss <sss@dark-alexandr.net>2021-11-05 21:35:24 +0300
committersss <sss@dark-alexandr.net>2021-11-05 21:35:24 +0300
commitd72c08e9da0b5aa8633e9830d6f8fda77caaa0fe (patch)
tree7491db44b9223b8340a779c714ba28ef26d8d658
parent4ce59fcc03b0e95a23c9bb3938a62294967643c4 (diff)
omemo: add also support for disable sending messages per contact (not
only receiving) explicitly set default setting values to disable
-rwxr-xr-xprotocols/JabberG/src/jabber_proto.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_thread.cpp2
2 files changed, 2 insertions, 2 deletions
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);