Don't require auto_login to be true when using the API to log in

This commit is contained in:
JC Brand 2017-09-16 20:02:47 +02:00
parent 57d2f9bce8
commit 43bbae9006
2 changed files with 8 additions and 6 deletions

View File

@ -6,6 +6,7 @@
can't be established.
- Remove `Login` and `Registration` tabs and consolidate into one panel.
- Add validation message for an invalid JID in the login form.
- Don't require `auto_login` to be `true` when using the API to log in.
- #828 Add routing for the `#converse-login` and `#converse-register` URL
fragments, which will render the registration and login forms respectively.

View File

@ -1722,12 +1722,13 @@
if (!reconnecting && this.keepalive && this.restoreBOSHSession()) {
return;
}
if (this.auto_login) {
if (credentials) {
// When credentials are passed in, they override prebinding
// or credentials fetching via HTTP
this.autoLogin(credentials);
} else if (this.credentials_url) {
if (credentials) {
// When credentials are passed in, they override prebinding
// or credentials fetching via HTTP
this.autoLogin(credentials);
} else if (this.auto_login) {
if (this.credentials_url) {
this.fetchLoginCredentials().then(
this.autoLogin.bind(this),
this.autoLogin.bind(this)