olm.Utility should be instanciated
This commit is contained in:
parent
0399562340
commit
561df45641
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Reference in a new issue