fixed muc detection for rare cases where muc is hosted on primary domain
This commit is contained in:
parent
c0d977e97d
commit
f0cfbb4681
|
@ -310,7 +310,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((body != null || pgpEncrypted != null || (axolotlEncrypted != null && axolotlEncrypted.hasChild("payload")) || oobUrl != null) && !isMucStatusMessage) {
|
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 Conversation conversation = mXmppConnectionService.findOrCreateConversation(account, counterpart.asBareJid(), conversationIsProbablyMuc, false, query, false);
|
||||||
final boolean conversationMultiMode = conversation.getMode() == Conversation.MODE_MULTI;
|
final boolean conversationMultiMode = conversation.getMode() == Conversation.MODE_MULTI;
|
||||||
|
|
||||||
|
|
|
@ -1521,6 +1521,12 @@ public class XmppConnection implements Runnable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getMucServersWithholdAccount() {
|
||||||
|
List<String> servers = getMucServers();
|
||||||
|
servers.remove(account.getServer());
|
||||||
|
return servers;
|
||||||
|
}
|
||||||
|
|
||||||
public List<String> getMucServers() {
|
public List<String> getMucServers() {
|
||||||
List<String> servers = new ArrayList<>();
|
List<String> servers = new ArrayList<>();
|
||||||
synchronized (this.disco) {
|
synchronized (this.disco) {
|
||||||
|
|
Loading…
Reference in New Issue