From a4b4c13c66e9e59d7b20de7fa16e98e742a1d57a Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Mon, 1 Dec 2014 09:48:30 +0100 Subject: do not query service info from main server again --- src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/main') 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 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); } } } -- cgit v1.2.3