when activating omemo in conference always check preferences

This commit is contained in:
Daniel Gultsch 2016-10-03 10:42:43 +02:00
parent dcd6ef8f84
commit 7c6d1d19d5
1 changed files with 14 additions and 14 deletions

View File

@ -660,6 +660,7 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
}
public Pair<AxolotlCapability,Jid> isConversationAxolotlCapableDetailed(Conversation conversation) {
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())) {
@ -673,13 +674,12 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
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);
}
} else {
return new Pair<>(AxolotlCapability.WRONG_CONFIGURATION, null);
}
}
}
public List<Jid> getCryptoTargets(Conversation conversation) {
final List<Jid> jids;