Commit d9e0b636 authored by Stanislav's avatar Stanislav Committed by JC Brand

Fix: use JID from credentials when credentials_url is set (#1638)

* Fix: async SetUserJID
parent 643c40f2
......@@ -671,11 +671,12 @@ function fetchLoginCredentials (wait=0) {
xhr.onload = () => {
if (xhr.status >= 200 && xhr.status < 400) {
const data = JSON.parse(xhr.responseText);
setUserJID(data.jid);
setUserJID(data.jid).then(() => {
resolve({
jid: data.jid,
password: data.password
});
});
} else {
reject(new Error(`${xhr.status}: ${xhr.responseText}`));
}
......
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