Commit 3b3720c3 authored by JC Brand's avatar JC Brand

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