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