diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-02-24 14:47:49 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-02-24 14:47:49 +0100 |
commit | d1a456f3e3e3f82e8e7b7f36d12b62ebb2a0fac2 (patch) | |
tree | 33b0f8dac6ea563938a1f557ec4dab542488090b /src/main/java/eu/siacs/conversations/entities | |
parent | ddafa65849e6c7e8d17566208b57ec614de05d5f (diff) |
made hard coded choice for encryptions more flexible and disable parsing
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Conversation.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index a179d96b..796b36f9 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; |