aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-10-03 10:42:43 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-10-03 10:42:43 +0200
commit7c6d1d19d5f21270056f8f0c1eb08f129b79a7d2 (patch)
treed64bbd84bed52aa1ac4c3b880afc4f2d851efaf3 /src/main/java/eu
parentdcd6ef8f848a4bdf12c0f01c92369eabef1da03f (diff)
when activating omemo in conference always check preferences
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
index 28085085..ddfe2d8e 100644
--- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
+++ b/src/main/java/eu/siacs/conversations/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);
}
}