do not query service info from main server again

This commit is contained in:
iNPUTmice 2014-12-01 09:48:30 +01:00
parent 57fd763066
commit a4b4c13c66

View file

@ -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);
}
}
}