fixed stuck at omemo encryption when x509 verification is being used

This commit is contained in:
Daniel Gultsch 2015-12-27 17:29:19 +01:00
parent f49158a44b
commit bcf99db3df
1 changed files with 7 additions and 7 deletions

View File

@ -609,15 +609,15 @@ public class Conversation extends AbstractEntity implements Blockable {
public int getNextEncryption() {
final AxolotlService axolotlService = getAccount().getAxolotlService();
if (Config.X509_VERIFICATION && mode == MODE_SINGLE) {
if (axolotlService != null && axolotlService.isContactAxolotlCapable(getContact())) {
return Message.ENCRYPTION_AXOLOTL;
} else {
return Message.ENCRYPTION_NONE;
}
}
int next = this.getIntAttribute(ATTRIBUTE_NEXT_ENCRYPTION, -1);
if (next == -1) {
if (Config.X509_VERIFICATION && mode == MODE_SINGLE) {
if (axolotlService != null && axolotlService.isContactAxolotlCapable(getContact())) {
return Message.ENCRYPTION_AXOLOTL;
} else {
return Message.ENCRYPTION_NONE;
}
}
int outgoing = this.getMostRecentlyUsedOutgoingEncryption();
if (outgoing == Message.ENCRYPTION_NONE) {
next = this.getMostRecentlyUsedIncomingEncryption();