diff --git a/package.json b/package.json index 3211bf4f..848e4104 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hydrogen-web", - "version": "0.2.21", + "version": "0.2.22", "description": "A javascript matrix client prototype, trying to minize RAM usage by offloading as much as possible to IndexedDB", "main": "src/lib.ts", "directories": { @@ -39,7 +39,7 @@ "eslint": "^7.32.0", "fake-indexeddb": "^3.1.2", "finalhandler": "^1.1.1", - "impunity": "^1.0.3", + "impunity": "^1.0.7", "mdn-polyfills": "^5.20.0", "postcss": "^8.1.1", "postcss-css-variables": "^0.17.0", diff --git a/src/matrix/SessionContainer.js b/src/matrix/SessionContainer.js index 3e3dab66..d8977dde 100644 --- a/src/matrix/SessionContainer.js +++ b/src/matrix/SessionContainer.js @@ -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); diff --git a/yarn.lock b/yarn.lock index 830a5cd5..52661eff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3021,10 +3021,10 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" -impunity@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/impunity/-/impunity-1.0.3.tgz#1e9972d137f0e0dbed4d39e6eca6c238a29b6526" - integrity sha512-D3XT8ED/AX5mbSQdAf0nz+65ilZE/q17Yykx8g7FqlnKjDdoowFv9kxdS4tOggPrJY/5lAfE86/ZFa878VpZBw== +impunity@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/impunity/-/impunity-1.0.7.tgz#b1484678ca82b7fce7750ab085a418302ce5883d" + integrity sha512-DIPr9toJHP8s/SMe6efOzhfGtiCbEniPO4JtHk6CvSZqtEPZpkF31l8TUrG8XTYxU1lBFwlkFi7RZ681YWdBrQ== dependencies: colors "^1.3.3" commander "^6.1.0"