when activating omemo in conference always check preferences
This commit is contained in:
parent
dcd6ef8f84
commit
7c6d1d19d5
|
@ -660,24 +660,24 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Pair<AxolotlCapability,Jid> isConversationAxolotlCapableDetailed(Conversation conversation) {
|
public Pair<AxolotlCapability,Jid> isConversationAxolotlCapableDetailed(Conversation conversation) {
|
||||||
final List<Jid> jids = getCryptoTargets(conversation);
|
if (conversation.getMucOptions().membersOnly() && conversation.getMucOptions().nonanonymous()) {
|
||||||
for(Jid jid : jids) {
|
final List<Jid> jids = getCryptoTargets(conversation);
|
||||||
if (!hasAny(jid) && (!deviceIds.containsKey(jid) || deviceIds.get(jid).isEmpty())) {
|
for(Jid jid : jids) {
|
||||||
if (conversation.getAccount().getRoster().getContact(jid).trusted()) {
|
if (!hasAny(jid) && (!deviceIds.containsKey(jid) || deviceIds.get(jid).isEmpty())) {
|
||||||
return new Pair<>(AxolotlCapability.MISSING_KEYS,jid);
|
if (conversation.getAccount().getRoster().getContact(jid).trusted()) {
|
||||||
} else {
|
return new Pair<>(AxolotlCapability.MISSING_KEYS,jid);
|
||||||
return new Pair<>(AxolotlCapability.MISSING_PRESENCE,jid);
|
} else {
|
||||||
|
return new Pair<>(AxolotlCapability.MISSING_PRESENCE,jid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (jids.size() > 0) {
|
||||||
if (jids.size() > 0) {
|
return new Pair<>(AxolotlCapability.FULL, null);
|
||||||
return new Pair<>(AxolotlCapability.FULL, null);
|
|
||||||
} else {
|
|
||||||
if (conversation.getMucOptions().membersOnly() && conversation.getMucOptions().nonanonymous()) {
|
|
||||||
return new Pair<>(AxolotlCapability.NO_MEMBERS, null);
|
|
||||||
} else {
|
} else {
|
||||||
return new Pair<>(AxolotlCapability.WRONG_CONFIGURATION, null);
|
return new Pair<>(AxolotlCapability.NO_MEMBERS, null);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return new Pair<>(AxolotlCapability.WRONG_CONFIGURATION, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue