You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
Request fresh flows on the initial registration request
This commit is contained in:
@@ -143,11 +143,13 @@ InteractiveAuth.prototype = {
|
|||||||
this._resolveFunc = resolve;
|
this._resolveFunc = resolve;
|
||||||
this._rejectFunc = reject;
|
this._rejectFunc = reject;
|
||||||
|
|
||||||
// if we have no flows, try a request (we'll have
|
const hasFlows = this._data && this._data.flows;
|
||||||
// just a session ID in _data if resuming)
|
|
||||||
if (this._data && !this._data.flows) {
|
// if we have no flows, try a request to acquire the flows
|
||||||
|
if (!hasFlows) {
|
||||||
if (this._busyChangedCallback) this._busyChangedCallback(true);
|
if (this._busyChangedCallback) this._busyChangedCallback(true);
|
||||||
this._doRequest(this._data).finally(() => {
|
// Do a fresh request as we're just acquiring flows.
|
||||||
|
this._doRequest(null).finally(() => {
|
||||||
if (this._busyChangedCallback) this._busyChangedCallback(false);
|
if (this._busyChangedCallback) this._busyChangedCallback(false);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -264,8 +266,7 @@ InteractiveAuth.prototype = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// use the sessionid from the last request.
|
// use the sessionid from the last request, if one is present.
|
||||||
// but keep the null in authData if this is the first stage.
|
|
||||||
let auth;
|
let auth;
|
||||||
if (this._data.session) {
|
if (this._data.session) {
|
||||||
auth = {
|
auth = {
|
||||||
|
|||||||
@@ -373,6 +373,7 @@ export function extend() {
|
|||||||
const target = arguments[0] || {};
|
const target = arguments[0] || {};
|
||||||
for (let i = 1; i < arguments.length; i++) {
|
for (let i = 1; i < arguments.length; i++) {
|
||||||
const source = arguments[i];
|
const source = arguments[i];
|
||||||
|
if (!source) continue;
|
||||||
for (const propName in source) { // eslint-disable-line guard-for-in
|
for (const propName in source) { // eslint-disable-line guard-for-in
|
||||||
target[propName] = source[propName];
|
target[propName] = source[propName];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user