diff options
-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) { |