diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-12-01 09:48:30 +0100 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-12-01 09:48:30 +0100 |
commit | a4b4c13c66e9e59d7b20de7fa16e98e742a1d57a (patch) | |
tree | 215d48710e2e26f4f449790047ca9f80e53398f2 /src | |
parent | 57fd763066a81b4d3444a53d973ec09324562cea (diff) |
do not query service info from main server again
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 2f5994c4..fb151427 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -848,11 +848,9 @@ public class XmppConnection implements Runnable { List<Element> elements = packet.query().getChildren(); for (Element element : elements) { if (element.getName().equals("item")) { - final String jid = element.getAttribute("jid"); - try { - sendServiceDiscoveryInfo(Jid.fromString(jid).toDomainJid()); - } catch (final InvalidJidException ignored) { - // TODO: Handle the case where an external JID is technically invalid? + final Jid jid = element.getAttributeAsJid("jid"); + if (jid != null && !jid.equals(account.getServer())) { + sendServiceDiscoveryInfo(jid); } } } |