aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-22 19:27:32 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-22 19:27:32 +0200
commitf61d006835b9690daeebb20963ca2a2b75ae30cb (patch)
tree90cdf298b42d8faff055c3587be78461d80eb93e /src/main/java/de
parentbf0b3fe351b530b64768afe03fdeaa7a130dbcde (diff)
fixed muc detection for rare cases where muc is hosted on primary domain
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/pixart/messenger/parser/MessageParser.java2
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/XmppConnection.java6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/MessageParser.java b/src/main/java/de/pixart/messenger/parser/MessageParser.java
index 86fae5b87..76318e0f2 100644
--- a/src/main/java/de/pixart/messenger/parser/MessageParser.java
+++ b/src/main/java/de/pixart/messenger/parser/MessageParser.java
@@ -413,7 +413,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
}
if ((body != null || pgpEncrypted != null || (axolotlEncrypted != null && axolotlEncrypted.hasChild("payload")) || oobUrl != null) && !isMucStatusMessage) {
- final boolean conversationIsProbablyMuc = isTypeGroupChat || mucUserElement != null || account.getXmppConnection().getMucServers().contains(counterpart.getDomain());
+ final boolean conversationIsProbablyMuc = isTypeGroupChat || mucUserElement != null || account.getXmppConnection().getMucServersWithholdAccount().contains(counterpart.getDomain());
final Conversation conversation = mXmppConnectionService.findOrCreateConversation(account, counterpart.asBareJid(), conversationIsProbablyMuc, false, query, false);
final boolean conversationMultiMode = conversation.getMode() == Conversation.MODE_MULTI;
if (serverMsgId == null) {
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
index baf77d23d..867fb824e 100644
--- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
+++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
@@ -1552,6 +1552,12 @@ public class XmppConnection implements Runnable {
}
}
+ public List<String> getMucServersWithholdAccount() {
+ List<String> servers = getMucServers();
+ servers.remove(account.getServer());
+ return servers;
+ }
+
public List<String> getMucServers() {
List<String> servers = new ArrayList<>();
synchronized (this.disco) {