From a6f0f0cb6e7d8853ba0f30d3aee5c2842304f451 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Mon, 8 Sep 2014 14:29:35 +0200 Subject: bug fixes for forcing encryption --- src/eu/siacs/conversations/entities/Conversation.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/eu/siacs/conversations/entities/Conversation.java b/src/eu/siacs/conversations/entities/Conversation.java index 7c6b5837..005b83db 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) { -- cgit v1.2.3