From 561df456413251a615e73c8405924a6037493183 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 31 Aug 2020 16:05:21 +0200 Subject: [PATCH] olm.Utility should be instanciated --- src/matrix/e2ee/DeviceTracker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/e2ee/DeviceTracker.js b/src/matrix/e2ee/DeviceTracker.js index 070a93fa..50b9f5e8 100644 --- a/src/matrix/e2ee/DeviceTracker.js +++ b/src/matrix/e2ee/DeviceTracker.js @@ -40,7 +40,7 @@ export class DeviceTracker { this._storage = storage; this._getSyncToken = getSyncToken; this._identityChangedForRoom = null; - this._olm = olm; + this._olmUtil = new olm.Utility(); } async writeDeviceChanges(deviceLists, txn) { @@ -217,7 +217,7 @@ export class DeviceTracker { throw new Error("no signature"); } // throws when signature is invalid - this._olm.Utility.ed25519_verify(key, canonicalJson, signature); + this._olmUtil.ed25519_verify(key, canonicalJson, signature); return true; } catch (err) { console.warn("Invalid device signature, ignoring device.", key, canonicalJson, signature, err);