From d1a456f3e3e3f82e8e7b7f36d12b62ebb2a0fac2 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 24 Feb 2016 14:47:49 +0100 Subject: made hard coded choice for encryptions more flexible and disable parsing --- .../java/eu/siacs/conversations/entities/Conversation.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/main/java/eu/siacs/conversations/entities') diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index a179d96bf..796b36f9f 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -673,11 +673,15 @@ public class Conversation extends AbstractEntity implements Blockable { next = outgoing; } } - if (Config.FORCE_E2E_ENCRYPTION && mode == MODE_SINGLE && next <= 0) { - if (axolotlService != null && axolotlService.isContactAxolotlCapable(getContact())) { + if (!Config.supportUnencrypted() + && (mode == MODE_SINGLE || Config.supportOpenPgpOnly()) + && next <= 0) { + if (Config.supportOmemo() && (axolotlService != null && axolotlService.isContactAxolotlCapable(getContact()) || !Config.multipleEncryptionChoices())) { return Message.ENCRYPTION_AXOLOTL; - } else { + } else if (Config.supportOtr()) { return Message.ENCRYPTION_OTR; + } else if (Config.supportOpenPgp()) { + return Message.ENCRYPTION_PGP; } } return next; -- cgit v1.2.3