mirror of
https://github.com/moparisthebest/Conversations
synced 2024-12-25 00:48:52 -05:00
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) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user