index : matrix-js-sdk

My fork of matrix-js-sdk

diff options
context:
space:
mode:
authorMichael Telatynski <[email protected]>2020-06-12 20:06:58 +0100
committerMichael Telatynski <[email protected]>2020-06-12 20:06:58 +0100
commitace8a787b4ff3486cc2a7d4dbacc73aaa440e7b8 (patch)
tree1c762a4d17b2fbb7b727d71b4f1b763548818776
parented2ea9ac8ef69580742d46fa87f3d02b074dfdde (diff)
downloadmatrix-js-sdk-ace8a787b4ff3486cc2a7d4dbacc73aaa440e7b8.tar.gz
undo that because `{}` sux
-rw-r--r--src/interactive-auth.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/interactive-auth.js b/src/interactive-auth.js
index b7e99b3d..edf5a429 100644
--- a/src/interactive-auth.js
+++ b/src/interactive-auth.js
@@ -148,7 +148,14 @@ InteractiveAuth.prototype = {
// if we have no flows, try a request to acquire the flows
if (!hasFlows) {
if (this._busyChangedCallback) this._busyChangedCallback(true);
- this._doRequest(this._data || 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 {