- $(elem).empty();
- cb = function(result) { /* Callback */
- if ($(result).find("feature[var='" + Strophe.NS.ADHOC + "']").length > 0) {
- this.getCommandNodes(elem);
- } else {
- $(elem).append("<p>" + this.status.queryJID + " does NOT support AdHoc commands</p>");
- }
- }
- ecb = function(result) { /* Errback */
- $(elem).append("<p>Couldn't get list of supported features</p>");
- }
- connection.sendIQ(featureIQ, cb.bind(this), ecb.bind(this));
+ $(this.status.view).empty();
+
+ function callback(result) {
+ if ($(result).find("feature[var='" + Strophe.NS.ADHOC + "']").length > 0) {
+ cb(result);
+ } else {
+ ecb(result);
+ }
+ }
+
+ connection.sendIQ(featureIQ, callback, ecb);