Commit 9a7f56db authored by JC Brand's avatar JC Brand

Fix format of stanza that queries for devices.

parent 4ed43854
This diff is collapsed.
...@@ -703,15 +703,13 @@ ...@@ -703,15 +703,13 @@
'type': 'get', 'type': 'get',
'from': _converse.bare_jid, 'from': _converse.bare_jid,
'to': this.get('jid') 'to': this.get('jid')
}).c('query', { }).c('pubsub', {'xmlns': Strophe.NS.PUBSUB})
'xmlns': Strophe.NS.DISCO_ITEMS, .c('items', {'node': Strophe.NS.OMEMO_DEVICELIST});
'node': Strophe.NS.OMEMO_DEVICELIST
});
_converse.connection.sendIQ( _converse.connection.sendIQ(
stanza, stanza,
(iq) => { (iq) => {
_.forEach( _.forEach(
iq.querySelectorAll('device'), sizzle(`list[xmlns="${Strophe.NS.OMEMO}"] device`, iq),
(dev) => this.devices.create({'id': dev.getAttribute('id'), 'jid': this.get('jid')}) (dev) => this.devices.create({'id': dev.getAttribute('id'), 'jid': this.get('jid')})
); );
resolve(); resolve();
...@@ -891,7 +889,7 @@ ...@@ -891,7 +889,7 @@
.catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR)); .catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR));
} }
_converse.api.listen.on('afterTearDown', () => _converse.devices.reset()); _converse.api.listen.on('afterTearDown', () => _converse.devicelists.reset());
_converse.api.listen.on('connected', registerPEPPushHandler); _converse.api.listen.on('connected', registerPEPPushHandler);
_converse.api.listen.on('renderToolbar', (view) => view.renderOMEMOToolbarButton()); _converse.api.listen.on('renderToolbar', (view) => view.renderOMEMOToolbarButton());
_converse.api.listen.on('statusInitialized', initOMEMO); _converse.api.listen.on('statusInitialized', initOMEMO);
......
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