mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
olm.Utility should be instanciated
This commit is contained in:
parent
0399562340
commit
561df45641
@ -40,7 +40,7 @@ export class DeviceTracker {
|
|||||||
this._storage = storage;
|
this._storage = storage;
|
||||||
this._getSyncToken = getSyncToken;
|
this._getSyncToken = getSyncToken;
|
||||||
this._identityChangedForRoom = null;
|
this._identityChangedForRoom = null;
|
||||||
this._olm = olm;
|
this._olmUtil = new olm.Utility();
|
||||||
}
|
}
|
||||||
|
|
||||||
async writeDeviceChanges(deviceLists, txn) {
|
async writeDeviceChanges(deviceLists, txn) {
|
||||||
@ -217,7 +217,7 @@ export class DeviceTracker {
|
|||||||
throw new Error("no signature");
|
throw new Error("no signature");
|
||||||
}
|
}
|
||||||
// throws when signature is invalid
|
// throws when signature is invalid
|
||||||
this._olm.Utility.ed25519_verify(key, canonicalJson, signature);
|
this._olmUtil.ed25519_verify(key, canonicalJson, signature);
|
||||||
return true;
|
return true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn("Invalid device signature, ignoring device.", key, canonicalJson, signature, err);
|
console.warn("Invalid device signature, ignoring device.", key, canonicalJson, signature, err);
|
||||||
|
Loading…
Reference in New Issue
Block a user