- featureIQ = $iq({ type: "get", to: connection.domain, id: "features1" }).c("query", {xmlns: Strophe.NS.DISCO_INFO});
- connection.sendIQ(featureIQ, function(result) {
- if ($(result).find("feature[var='" + Strophe.NS.ADHOC + "']").length > 0) {
- $('#output').append("<p>This entitiy does support AdHoc commands</p>");
- } else {
- $('#output').append("<p>This entitiy does NOT support AdHoc commands</p>");
+ featureIQ = $iq({ type: "get", to: adhoc_status.queryJID, id: "features1" }).c("query", {xmlns: Strophe.NS.DISCO_INFO});
+ $('#output').empty();
+ connection.sendIQ(featureIQ,
+ function(result) { /* Callback */
+ if ($(result).find("feature[var='" + Strophe.NS.ADHOC + "']").length > 0) {
+ $('#output').append("<p>This entitiy does support AdHoc commands</p>");
+ getCommandNodes();
+ } else {
+ $('#output').append("<p>This entitiy does NOT support AdHoc commands</p>");
+ }
+ },
+ function(result) { /* Errback */
+ $('#output').append("<p>Couldn't get list of supported features</p>");