diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-12-01 22:41:58 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-12-01 22:41:58 +0100 |
commit | dc8967d8fc09a5b7e515bb5005726d677a08c86b (patch) | |
tree | dff76dd5f6f71af64ca3b7cc2e723fdd2dafc5a7 /src/main/java/eu/siacs/conversations/entities/Conversation.java | |
parent | 65b5504e68e36116234bd69126304d6d764b678b (diff) |
introduced build-time paranoia mode that disables unencrypted chats and forces TOR
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities/Conversation.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Conversation.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index 473ef0fe..e93d5564 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -612,9 +612,16 @@ public class Conversation extends AbstractEntity implements Blockable { if (next == -1) { int outgoing = this.getMostRecentlyUsedOutgoingEncryption(); if (outgoing == Message.ENCRYPTION_NONE) { - return this.getMostRecentlyUsedIncomingEncryption(); + next = this.getMostRecentlyUsedIncomingEncryption(); } else { - return outgoing; + next = outgoing; + } + } + if (Config.PARANOID_MODE && mode == MODE_SINGLE && next <= 0) { + if (getAccount().getAxolotlService().isContactAxolotlCapable(getContact())) { + return Message.ENCRYPTION_AXOLOTL; + } else { + return Message.ENCRYPTION_OTR; } } return next; |