aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Conversation.java10
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;