do not use omemo by default for own server
This commit is contained in:
parent
fc62cbbc52
commit
12127a0b6e
|
@ -443,7 +443,11 @@ public class Contact implements ListItem, Blockable {
|
|||
}
|
||||
|
||||
public boolean isSelf() {
|
||||
return account.getJid().asBareJid().equals(getJid().asBareJid());
|
||||
return account.getJid().asBareJid().equals(jid.asBareJid());
|
||||
}
|
||||
|
||||
public boolean isOwnServer() {
|
||||
return account.getJid().getDomain().equals(jid.getDomain());
|
||||
}
|
||||
|
||||
public void setCommonName(String cn) {
|
||||
|
|
|
@ -622,6 +622,9 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
|||
if (conversation.getJid().asBareJid().equals(Config.BUG_REPORTS)) {
|
||||
return false;
|
||||
}
|
||||
if (conversation.getContact().isOwnServer()) {
|
||||
return false;
|
||||
}
|
||||
final String contact = conversation.getJid().getDomain();
|
||||
final String account = conversation.getAccount().getServer();
|
||||
if (Config.OMEMO_EXCEPTIONS.CONTACT_DOMAINS.contains(contact) || Config.OMEMO_EXCEPTIONS.ACCOUNT_DOMAINS.contains(account)) {
|
||||
|
@ -922,7 +925,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
|||
public boolean isWithStranger() {
|
||||
final Contact contact = getContact();
|
||||
return mode == MODE_SINGLE
|
||||
&& !contactJid.equals(Jid.ofDomain(account.getJid().getDomain()))
|
||||
&& !contact.isOwnServer()
|
||||
&& !contact.showInRoster()
|
||||
&& !contact.isSelf()
|
||||
&& sentMessagesCount() == 0;
|
||||
|
|
Loading…
Reference in New Issue