aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-12-27 17:29:19 +0100
committerDaniel Gultsch <daniel@gultsch.de>2015-12-27 17:29:19 +0100
commitbcf99db3df27c196caba823b08fb55cf196dc9c8 (patch)
treeef81b3647f234e04a5a1131c8ec99234fbc943cd
parentf49158a44b2d28b7704ffd49ae7f688aa6310eda (diff)
fixed stuck at omemo encryption when x509 verification is being used
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Conversation.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java
index 962ad13b..7793cc23 100644
--- a/src/main/java/eu/siacs/conversations/entities/Conversation.java
+++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java
@@ -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();