diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-11-15 21:11:35 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-11-15 21:11:35 +0100 |
commit | ec63900ef356ae0771071bcf460f2fe47b46b256 (patch) | |
tree | ea3e3edfe9024fcaf6fb742957e6974314478601 /src | |
parent | 48afeb571bcc2ae1d123ef549426c06e52dc1cc9 (diff) |
work around -1 in next encryption
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Conversation.java | 2 |
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) { |