Commit 45ed5065 authored by JC Brand's avatar JC Brand

Don't hardcode devices storage to session storage.

The devicelists are not stored in session storage, so we end up with
fetching all the devices per stored devicelist with every new browser
session.
parent e6c66cfe
......@@ -56968,7 +56968,10 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
initialize() {
this.devices = new _converse.Devices();
const id = `converse.devicelist-${_converse.bare_jid}-${this.get('jid')}`;
this.devices.browserStorage = new Backbone.BrowserStorage.session(id);
const storage = _converse.config.get('storage');
this.devices.browserStorage = new Backbone.BrowserStorage[storage](id);
this.fetchDevices();
},
......@@ -944,7 +944,8 @@ converse.plugins.add('converse-omemo', {
initialize () {
this.devices = new _converse.Devices();
const id = `converse.devicelist-${_converse.bare_jid}-${this.get('jid')}`;
this.devices.browserStorage = new Backbone.BrowserStorage.session(id);
const storage = _converse.config.get('storage');
this.devices.browserStorage = new Backbone.BrowserStorage[storage](id);
this.fetchDevices();
},
......
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