Просмотр исходного кода

Don't close chatboxes after disconnection has already happened

Otherwise it attemtps to send out stanzas (causing `this.socket is null`
errors when using websocket).
JC Brand 7 лет назад
Родитель
Сommit
2cdd46f6dc
1 измененных файлов с 1 добавлено и 7 удалено
  1. 1 7
      src/converse-chatboxes.js

+ 1 - 7
src/converse-chatboxes.js

@@ -29,12 +29,6 @@
             // plugin architecture they will replace existing methods on the
             // relevant objects or classes.
 
-            disconnect: function () {
-                const { _converse } = this.__super__;
-                _converse.chatboxviews.closeAllChatBoxes();
-                return this.__super__.disconnect.apply(this, arguments);
-            },
-
             initStatus: function (reconnecting) {
                 const { _converse } = this.__super__;
                 if (!reconnecting) {
@@ -833,7 +827,7 @@
                 _converse.emit('chatBoxesInitialized');
             });
 
-            _converse.api.listen.on('logout', () => {
+            _converse.api.listen.on('clearSession', () => {
                 _converse.chatboxviews.closeAllChatBoxes();
             });