瀏覽代碼

We still need the roster in core, so set it there.

Still have to move the roster code out of src/converse-controlbox.js
JC Brand 9 年之前
父節點
當前提交
4ebed3c995
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 0 3
      src/converse-controlbox.js
  2. 3 0
      src/converse-core.js

+ 0 - 3
src/converse-controlbox.js

@@ -265,9 +265,6 @@
                     /* We initialize the roster, which will appear inside the
                     * Contacts Panel.
                     */
-                    converse.roster = new converse.RosterContacts();
-                    converse.roster.browserStorage = new Backbone.BrowserStorage[converse.storage](
-                        b64_sha1('converse.contacts-'+converse.bare_jid));
                     var rostergroups = new converse.RosterGroups();
                     rostergroups.browserStorage = new Backbone.BrowserStorage[converse.storage](
                         b64_sha1('converse.roster.groups'+converse.bare_jid));

+ 3 - 0
src/converse-core.js

@@ -822,6 +822,9 @@
             this.enableCarbons();
             this.initStatus(function () {
                 this.registerIntervalHandler();				
+                this.roster = new this.RosterContacts();
+                this.roster.browserStorage = new Backbone.BrowserStorage[this.storage](
+                    b64_sha1('converse.contacts-'+this.bare_jid));
                 this.chatboxes.onConnected();
                 this.giveFeedback(__('Contacts'));
                 if (typeof this.callback === 'function') {