JC Brand 8 年之前
父節點
當前提交
e48015df66
共有 3 個文件被更改,包括 8 次插入2 次删除
  1. 1 0
      .eslintrc.json
  2. 2 0
      CHANGES.md
  3. 5 2
      src/converse-controlbox.js

+ 1 - 0
.eslintrc.json

@@ -23,6 +23,7 @@
         "lodash/prefer-noop": "off",
         "lodash/prefer-lodash-typecheck": "off",
         "lodash/preferred-alias": "off",
+        "lodash/prefer-get": "off",
         "accessor-pairs": "error",
         "array-bracket-spacing": "off",
         "array-callback-return": "error",

+ 2 - 0
CHANGES.md

@@ -18,6 +18,8 @@
   `chatbox` attributes, instead of just the stanza. [jcbrand]
 - Render nickname form when entering a room via invitation. [jcbrand]
 - #567 Unreaded message count reset on page load [novokrest]
+- #575 Logging out from converse.js doesn't clear the connection status from the
+  sessionStorage [jcbrand]
 - #591 Unread message counter is reset when the chatbox is closed [novokrest]
 - #754 Show unread messages next to roster contacts. [jcbrand]
 - #864 Remove all inline CSS to comply with strict Content-Security-Policy headers [mathiasertl]

+ 5 - 2
src/converse-controlbox.js

@@ -92,8 +92,11 @@
 
             clearSession: function () {
                 this.__super__.clearSession.apply(this, arguments);
-                if (_.isUndefined(this.connection) && this.connection.connected) {
-                    this.chatboxes.get('controlbox').save({'connected': false});
+                var controlbox = this.chatboxes.get('controlbox');
+                if (controlbox &&
+                        controlbox.collection &&
+                        controlbox.collection.browserStorage) {
+                    controlbox.save({'connected': false});
                 }
             },