Skip to content

Commit

Permalink
Merge pull request #599 from vector-im/bwindels/fix-emsonelogin
Browse files Browse the repository at this point in the history
Don't fail login if dehydrated devices are not supported
  • Loading branch information
bwindels authored Nov 25, 2021
2 parents 93abbe8 + ae7d4d0 commit 92bf28e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/matrix/SessionContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,16 @@ export class SessionContainer {
request: this._platform.request,
});
const olm = await this._olmPromise;
const encryptedDehydratedDevice = await getDehydratedDevice(hsApi, olm, this._platform, log);
let encryptedDehydratedDevice;
try {
encryptedDehydratedDevice = await getDehydratedDevice(hsApi, olm, this._platform, log);
} catch (err) {
if (err.name === "HomeServerError") {
log.set("not_supported", true);
} else {
throw err;
}
}
if (encryptedDehydratedDevice) {
let resolveStageFinish;
const promiseStageFinish = new Promise(r => resolveStageFinish = r);
Expand Down

0 comments on commit 92bf28e

Please sign in to comment.