Commit 699fe0df authored by JC Brand's avatar JC Brand

Initial support for the CredentialsContainer web API

parent 737e27c7
# Changelog # Changelog
## 5.0.0 (Unreleased) ## 5.0.0 (Unreleased)
- Initial support for the [CredentialsContainer](https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer) web API
- Allow for synchronous events. When a synchronous event is fired, Converse will - Allow for synchronous events. When a synchronous event is fired, Converse will
wait for all promises returned by the event's handlers to finish before continuing. wait for all promises returned by the event's handlers to finish before continuing.
- Properly handle message correction being received before the corrected message - Properly handle message correction being received before the corrected message
......
...@@ -1346,6 +1346,12 @@ _converse.initialize = async function (settings, callback) { ...@@ -1346,6 +1346,12 @@ _converse.initialize = async function (settings, callback) {
} }
} else if (reconnecting) { } else if (reconnecting) {
this.autoLogin(); this.autoLogin();
} else if (window.PasswordCredential) {
const creds = await navigator.credentials.get({'password': true});
if (creds && creds.type == 'password' && u.isValidJID(creds.id)) {
setUserJID(creds.id);
this.autoLogin({'jid': creds.id, 'password': creds.password});
}
} }
}; };
......
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