Commit 156d231c authored by JC Brand's avatar JC Brand

Converse.js now responds to XEP-0030 Service discovery requests.

parent 9f6e36e3
......@@ -3998,6 +3998,7 @@
*/
model: converse.Feature,
initialize: function () {
this.addClientIdentities().addClientFeatures();
this.browserStorage = new Backbone.BrowserStorage[converse.storage](
b64_sha1('converse.features'+converse.bare_jid));
if (this.browserStorage.records.length === 0) {
......@@ -4010,6 +4011,30 @@
}
},
addClientIdentities: function () {
/* See http://xmpp.org/registrar/disco-categories.html
*/
converse.connection.disco.addIdentity('client', 'web', 'Converse.js');
return this;
},
addClientFeatures: function () {
/* The strophe.disco.js plugin keeps a list of features which
* it will advertise to any #info queries made to it.
*
* See: http://xmpp.org/extensions/xep-0030.html#info
*/
converse.connection.disco.addFeature('http://jabber.org/protocol/chatstates'); // Limited support
converse.connection.disco.addFeature('http://jabber.org/protocol/rosterx'); // Limited support
converse.connection.disco.addFeature('jabber:x:conference');
converse.connection.disco.addFeature('urn:xmpp:carbons:2');
converse.connection.disco.addFeature('vcard-temp');
converse.connection.disco.addFeature(Strophe.NS.BOSH);
converse.connection.disco.addFeature(Strophe.NS.DISCO_INFO);
converse.connection.disco.addFeature(Strophe.NS.MUC);
return this;
},
onItems: function (stanza) {
$(stanza).find('query item').each($.proxy(function (idx, item) {
converse.connection.disco.info(
......
......@@ -4,6 +4,8 @@ Changelog
0.8.1 (Unreleased)
------------------
* Converse.js now responds to XEP-0030: Service Discovery requests. [jcbrand]
* #215 (and also #75) XEP-0249: Direct MUC Invitations. [jcbrand]
* #216 Contacts tab empty when using xhr_user_search. [hcderaad and jcbrand]
0.8.1 (2014-08-23)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment