diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-09-08 14:29:35 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-09-08 14:29:35 +0200 |
commit | a6f0f0cb6e7d8853ba0f30d3aee5c2842304f451 (patch) | |
tree | 143839fc0f6728730224d44a9528ed5e29593767 /src/eu/siacs | |
parent | 5cb11396f662252ff294f6cda719877e0473bac4 (diff) |
bug fixes for forcing encryption
Diffstat (limited to 'src/eu/siacs')
-rw-r--r-- | src/eu/siacs/conversations/entities/Conversation.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/entities/Conversation.java b/src/eu/siacs/conversations/entities/Conversation.java index 7c6b58376..005b83db0 100644 --- a/src/eu/siacs/conversations/entities/Conversation.java +++ b/src/eu/siacs/conversations/entities/Conversation.java @@ -363,7 +363,12 @@ public class Conversation extends AbstractEntity { return latest; } } - return this.nextMessageEncryption; + if (this.nextMessageEncryption == Message.ENCRYPTION_NONE && force + && getMode() == MODE_SINGLE) { + return Message.ENCRYPTION_OTR; + } else { + return this.nextMessageEncryption; + } } public void setNextEncryption(int encryption) { |