Commit d8f2a1eb authored by JC Brand's avatar JC Brand

In embedded mode, allow fetching of rooms from sessionStorage

Otherwise we lose the MUC session upon reload.
parent 732c9233
......@@ -23,25 +23,6 @@
//
// New functions which don't exist yet can also be added.
ChatBoxes: {
onConnected () {
// Override to avoid storing or fetching chat boxes from session
// storage.
const { _converse } = this.__super__;
this.browserStorage = new Backbone.BrowserStorage[_converse.storage](
converse.env.b64_sha1(`converse.chatboxes-${_converse.bare_jid}`));
this.registerMessageHandler();
/* This is disabled:
*
* this.fetch({
* add: true,
* success: this.onChatBoxesFetched.bind(this)
* });
*/
this.onChatBoxesFetched(new Backbone.Collection());
}
},
ChatBoxViews: {
initialize () {
this.__super__.initialize.apply(this, arguments);
......
......@@ -2893,6 +2893,9 @@
* settings).
*/
_.each(_converse.auto_join_rooms, function (room) {
if (_converse.chatboxes.where({'jid': room}).length) {
return;
}
if (_.isString(room)) {
_converse.api.rooms.open(room);
} else if (_.isObject(room)) {
......
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