Переглянути джерело

converse-core: Attempt to log in again when reconnecting

and when auto_login is not `true`. Will only work if the page wasn't reloaded,
because then the password will still be on the connection.
JC Brand 8 роки тому
батько
коміт
3b3720c32d
1 змінених файлів з 5 додано та 2 видалено
  1. 5 2
      src/converse-core.js

+ 5 - 2
src/converse-core.js

@@ -466,8 +466,9 @@
                 converse.giveFeedback(__('Authentication failed.'), 'error');
                 converse.connection.disconnect(__('Authentication Failed'));
                 converse.disconnection_cause = Strophe.Status.AUTHFAIL;
-            } else if (status === Strophe.Status.CONNFAIL ||
-                       status === Strophe.Status.DISCONNECTING) {
+            } else if (status === Strophe.Status.CONNFAIL) {
+                converse.setDisconnectionCause(status);
+            } else if (status === Strophe.Status.DISCONNECTING) {
                 converse.setDisconnectionCause(status);
             }
         };
@@ -1863,6 +1864,8 @@
                     // Probably ANONYMOUS login
                     this.autoLogin();
                 }
+            } else if (reconnecting) {
+                this.autoLogin();
             }
         };