|
|
@ -34,7 +34,7 @@ var Client = function(params) {
|
|
|
|
jabber._debug('IQ result: ' + stanza);
|
|
|
|
jabber._debug('IQ result: ' + stanza);
|
|
|
|
jabber.emit('iqResult', stanza.attrs.id, stanza);
|
|
|
|
jabber.emit('iqResult', stanza.attrs.id, stanza);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this._debug('IQ: ' + stanza);
|
|
|
|
jabber._debug('IQ: ' + stanza);
|
|
|
|
jabber.emit('iq', stanza);
|
|
|
|
jabber.emit('iq', stanza);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -110,8 +110,8 @@ Client.prototype.iq = function(iq, callback) {
|
|
|
|
this.xmpp.send(new xmpp.Element('iq', {type:"get", id: n}).cnode(iq).tree());
|
|
|
|
this.xmpp.send(new xmpp.Element('iq', {type:"get", id: n}).cnode(iq).tree());
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Client.prototype.presence = function() {
|
|
|
|
Client.prototype.presence = function(type) {
|
|
|
|
this.xmpp.send(new xmpp.Element('presence', {type: 'available'}).tree());
|
|
|
|
this.xmpp.send(new xmpp.Element('presence', (type != null) ? {type: type} : {}).tree());
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Client.prototype.disconnect = function() {
|
|
|
|
Client.prototype.disconnect = function() {
|
|
|
|