From a136138daa9a3a39ffa06d309f6c666ef28ece5b Mon Sep 17 00:00:00 2001 From: kosyak Date: Sun, 14 Jul 2024 12:22:02 +0200 Subject: [PATCH] otr fixes --- .../java/eu/siacs/conversations/entities/Conversation.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index da60498d3..b2380560a 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -1127,8 +1127,10 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl defaultEncryption = Message.ENCRYPTION_NONE; } int encryption = this.getIntAttribute(ATTRIBUTE_NEXT_ENCRYPTION, defaultEncryption); - if (encryption == Message.ENCRYPTION_OTR || encryption < 0) { + if (encryption < 0) { return defaultEncryption; + } else if (encryption == Message.ENCRYPTION_OTR) { + return encryption; } else { return encryption; }