aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-10-05 20:51:39 +0200
committerChristian Schneppe <christian@pix-art.de>2016-10-05 20:51:39 +0200
commitc50d2d68fb3f6b7f07aed1949f735ec9b4a75932 (patch)
tree0781626e0d763954cdb3a4e61ef86938638fd33a /src
parent2d2f198da8f19e762cdbb014d6150f4996403296 (diff)
when activating omemo in conference always check preferences
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
index 4e293c9a1..4179c6f07 100644
--- a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
+++ b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
@@ -660,24 +660,24 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
}
public Pair<AxolotlCapability,Jid> isConversationAxolotlCapableDetailed(Conversation conversation) {
- final List<Jid> jids = getCryptoTargets(conversation);
- for(Jid jid : jids) {
- if (!hasAny(jid) && (!deviceIds.containsKey(jid) || deviceIds.get(jid).isEmpty())) {
- if (conversation.getAccount().getRoster().getContact(jid).trusted()) {
- return new Pair<>(AxolotlCapability.MISSING_KEYS,jid);
- } else {
- return new Pair<>(AxolotlCapability.MISSING_PRESENCE,jid);
+ if (conversation.getMucOptions().membersOnly() && conversation.getMucOptions().nonanonymous()) {
+ final List<Jid> jids = getCryptoTargets(conversation);
+ for(Jid jid : jids) {
+ if (!hasAny(jid) && (!deviceIds.containsKey(jid) || deviceIds.get(jid).isEmpty())) {
+ if (conversation.getAccount().getRoster().getContact(jid).trusted()) {
+ return new Pair<>(AxolotlCapability.MISSING_KEYS,jid);
+ } else {
+ return new Pair<>(AxolotlCapability.MISSING_PRESENCE,jid);
+ }
}
}
- }
- if (jids.size() > 0) {
- return new Pair<>(AxolotlCapability.FULL, null);
- } else {
- if (conversation.getMucOptions().membersOnly() && conversation.getMucOptions().nonanonymous()) {
- return new Pair<>(AxolotlCapability.NO_MEMBERS, null);
+ if (jids.size() > 0) {
+ return new Pair<>(AxolotlCapability.FULL, null);
} else {
- return new Pair<>(AxolotlCapability.WRONG_CONFIGURATION, null);
+ return new Pair<>(AxolotlCapability.NO_MEMBERS, null);
}
+ } else {
+ return new Pair<>(AxolotlCapability.WRONG_CONFIGURATION, null);
}
}