Merge pull request #1407 from matrix-org/jryans/1403-release

Use existing session id for fetching flows as to not get a new session
This commit is contained in:
J. Ryan Stinnett
2020-06-16 10:56:00 +01:00
committed by GitHub
+8 -2
View File
@@ -148,8 +148,14 @@ InteractiveAuth.prototype = {
// if we have no flows, try a request to acquire the flows
if (!hasFlows) {
if (this._busyChangedCallback) this._busyChangedCallback(true);
// Do a fresh request as we're just acquiring flows.
this._doRequest(null).finally(() => {
// use the existing sessionid, if one is present.
let auth = null;
if (this._data.session) {
auth = {
session: this._data.session,
};
}
this._doRequest(auth).finally(() => {
if (this._busyChangedCallback) this._busyChangedCallback(false);
});
} else {