index : matrix-js-sdk

My fork of matrix-js-sdk

diff options
context:
space:
mode:
authorJ. Ryan Stinnett <[email protected]>2020-06-16 10:56:00 +0100
committerGitHub <[email protected]>2020-06-16 10:56:00 +0100
commit60fcc652deff3ad4cc746a2ad2adbbfc7012c0aa (patch)
treebef85863914a3a3564e12c514f1c7e0d97cb8970
parent12b573bc63dada2ad3590dda113f99bc2530b2f1 (diff)
parentcb5771742471339a0bbd9d332f6399989c835897 (diff)
downloadmatrix-js-sdk-60fcc652deff3ad4cc746a2ad2adbbfc7012c0aa.tar.gz
Merge pull request #1407 from matrix-org/jryans/1403-release
Use existing session id for fetching flows as to not get a new session
-rw-r--r--src/interactive-auth.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/interactive-auth.js b/src/interactive-auth.js
index ad47701e..edf5a429 100644
--- a/src/interactive-auth.js
+++ b/src/interactive-auth.js
@@ -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 {