diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-11-21 20:34:19 +0100 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-11-21 20:34:19 +0100 |
commit | 28fefad8343c6d0aea2f52333e60b4dd003e811a (patch) | |
tree | aec61c84987c5c0147f00d1a9eb8432db44a63d7 /src/main/java/eu/siacs | |
parent | 36f8a31d7d80453d6ae6164629fd1fd84601c7fb (diff) |
work around to not confuse irc transport with real conference servers
Diffstat (limited to 'src/main/java/eu/siacs')
-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 dc895eadb..2f5994c46 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(); } } |