forked from mystiq/hydrogen-web
Merge pull request #599 from vector-im/bwindels/fix-emsonelogin
Don't fail login if dehydrated devices are not supported
This commit is contained in:
commit
92bf28e104
1 changed files with 10 additions and 1 deletions
|
@ -329,7 +329,16 @@ export class SessionContainer {
|
||||||
request: this._platform.request,
|
request: this._platform.request,
|
||||||
});
|
});
|
||||||
const olm = await this._olmPromise;
|
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) {
|
if (encryptedDehydratedDevice) {
|
||||||
let resolveStageFinish;
|
let resolveStageFinish;
|
||||||
const promiseStageFinish = new Promise(r => resolveStageFinish = r);
|
const promiseStageFinish = new Promise(r => resolveStageFinish = r);
|
||||||
|
|
Loading…
Reference in a new issue