IQ result = iq.createResult();
result.setExtension(new InfoDiscovery(infoNode.getNode(), infoNode.getIdentities(), infoNode.getFeatures(), infoNode.getExtensions()));
xmppSession.send(result);
e.consume();
} else {
xmppSession.send(iq.createError(new StanzaError(new ItemNotFound())));
e.consume();
}
}
} else {
ItemDiscovery itemDiscovery = iq.getExtension(ItemDiscovery.class);
if (itemDiscovery != null) {
if (itemDiscovery.getNode() == null) {
IQ result = iq.createResult();
result.setExtension(new ItemDiscovery(items));
xmppSession.send(result);
e.consume();
} else {
ItemNode itemNode = itemNodeMap.get(itemDiscovery.getNode());
if (itemNode != null) {
IQ result = iq.createResult();
result.setExtension(new ItemDiscovery(itemNode.getNode(), items));
xmppSession.send(result);
e.consume();
} else {
xmppSession.send(iq.createError(new StanzaError(new ItemNotFound())));
e.consume();
}
}
}
}