diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index dc895ead..2f5994c4 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -810,7 +810,12 @@ public class XmppConnection implements Runnable { final List<Element> elements = packet.query().getChildren(); final List<String> features = new ArrayList<>(); for (Element element : elements) { - if (element.getName().equals("feature")) { + if (element.getName().equals("identity")) { + if ("irc".equals(element.getAttribute("type"))) { + //add fake feature to not confuse irc and real muc + features.add("siacs:no:muc"); + } + } else if (element.getName().equals("feature")) { features.add(element.getAttribute("var")); } } @@ -1052,7 +1057,7 @@ public class XmppConnection implements Runnable { final List<String> items = new ArrayList<>(); for (Entry<String, List<String>> cursor : disco.entrySet()) { final List<String> value = cursor.getValue(); - if (value.contains("http://jabber.org/protocol/muc") && !value.contains("jabber:iq:gateway")) { + if (value.contains("http://jabber.org/protocol/muc") && !value.contains("jabber:iq:gateway") && !value.contains("siacs:no:muc")) { return cursor.getKey(); } } |