|
|
|
@ -62,10 +62,19 @@ Client.prototype.getRoster = function(callback) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
http://xmpp.org/extensions/xep-0092.html
|
|
|
|
|
*/
|
|
|
|
|
Client.prototype.getVersion = function(jid, callback, error) {
|
|
|
|
|
var jabber = this;
|
|
|
|
|
this.iq(jid, new xmpp.Element('query', {xmlns: 'jabber:iq:version'}), function(iq) {
|
|
|
|
|
callback.call(jabber, iq.getChild('query', 'jabber:iq:version') );
|
|
|
|
|
var v = iq.getChild('query', 'jabber:iq:version');
|
|
|
|
|
var version = {
|
|
|
|
|
name: v.getChildText('name'),
|
|
|
|
|
version: v.getChildText('version'),
|
|
|
|
|
os: v.getChildText('os')
|
|
|
|
|
};
|
|
|
|
|
callback.call(jabber, version);
|
|
|
|
|
}, error);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|