Commit e875e18c authored by JC Brand's avatar JC Brand

Bugfix. browserStorage of contacts wasn't changing accross users.

parent 1be8a386
...@@ -568,7 +568,14 @@ ...@@ -568,7 +568,14 @@
this.enableCarbons(); this.enableCarbons();
this.initStatus($.proxy(function () { this.initStatus($.proxy(function () {
this.roster = new converse.RosterContacts(); this.roster = new converse.RosterContacts();
this.rosterview = new this.RosterView({model: new this.RosterGroups()}); this.roster.browserStorage = new Backbone.BrowserStorage[this.storage](
b64_sha1('converse.contacts-'+this.bare_jid));
var rostergroups = new this.RosterGroups();
rostergroups.browserStorage = new Backbone.BrowserStorage[this.storage](
b64_sha1('converse.roster.groups'+this.bare_jid));
this.rosterview = new this.RosterView({model: rostergroups});
this.chatboxes.onConnected(); this.chatboxes.onConnected();
this.connection.roster.get(function () {}); this.connection.roster.get(function () {});
this.giveFeedback(__('Online Contacts')); this.giveFeedback(__('Online Contacts'));
...@@ -2936,8 +2943,6 @@ ...@@ -2936,8 +2943,6 @@
this.RosterContacts = Backbone.Collection.extend({ this.RosterContacts = Backbone.Collection.extend({
model: converse.RosterContact, model: converse.RosterContact,
browserStorage: new Backbone.BrowserStorage[converse.storage](
b64_sha1('converse.contacts-'+converse.bare_jid)),
comparator: function (contact1, contact2) { comparator: function (contact1, contact2) {
var name1 = contact1.get('fullname').toLowerCase(); var name1 = contact1.get('fullname').toLowerCase();
...@@ -3338,11 +3343,6 @@ ...@@ -3338,11 +3343,6 @@
} else if (a_is_special && !b_is_special) { } else if (a_is_special && !b_is_special) {
return (a === HEADER_CURRENT_CONTACTS) ? -1 : 1; return (a === HEADER_CURRENT_CONTACTS) ? -1 : 1;
} }
},
initialize: function () {
this.browserStorage = new Backbone.BrowserStorage[converse.storage](
b64_sha1('converse.roster.groups'+converse.bare_jid));
} }
}); });
......
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