work around -1 in next encryption

This commit is contained in:
Daniel Gultsch 2016-11-15 21:11:35 +01:00
parent 48afeb571b
commit ec63900ef3

View File

@ -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) {