aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-11-15 21:11:35 +0100
committerDaniel Gultsch <daniel@gultsch.de>2016-11-15 21:11:35 +0100
commitec63900ef356ae0771071bcf460f2fe47b46b256 (patch)
treeea3e3edfe9024fcaf6fb742957e6974314478601 /src/main/java/eu/siacs
parent48afeb571bcc2ae1d123ef549426c06e52dc1cc9 (diff)
work around -1 in next encryption
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Conversation.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java
index 963cf3bc..245ff288 100644
--- a/src/main/java/eu/siacs/conversations/entities/Conversation.java
+++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java
@@ -697,7 +697,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
}
public int getNextEncryption() {
- return this.getIntAttribute(ATTRIBUTE_NEXT_ENCRYPTION, Message.ENCRYPTION_NONE);
+ return Math.max(this.getIntAttribute(ATTRIBUTE_NEXT_ENCRYPTION, Message.ENCRYPTION_NONE), Message.ENCRYPTION_NONE);
}
public void setNextEncryption(int encryption) {