aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Contact.java6
-rw-r--r--src/main/java/de/pixart/messenger/entities/Conversation.java5
2 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Contact.java b/src/main/java/de/pixart/messenger/entities/Contact.java
index 3872ceecb..8112c4a3c 100644
--- a/src/main/java/de/pixart/messenger/entities/Contact.java
+++ b/src/main/java/de/pixart/messenger/entities/Contact.java
@@ -515,7 +515,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) {
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java
index 6f995b2be..d2d081a90 100644
--- a/src/main/java/de/pixart/messenger/entities/Conversation.java
+++ b/src/main/java/de/pixart/messenger/entities/Conversation.java
@@ -782,6 +782,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)) {
@@ -1109,7 +1112,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;