You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2026-01-03 23:22:30 +03:00
Change check{User|Device}Trust interfaces
...to return objects with functions rather than a bitmask
This commit is contained in:
@@ -318,9 +318,17 @@ describe("SAS verification", function() {
|
||||
|
||||
await verifyProm;
|
||||
|
||||
expect(alice.client.checkDeviceTrust("@bob:example.com", "Dynabook")).toBe(1);
|
||||
expect(bob.client.checkUserTrust("@alice:example.com")).toBe(6);
|
||||
expect(bob.client.checkDeviceTrust("@alice:example.com", "Osborne2")).toBe(1);
|
||||
const bobDeviceTrust = alice.client.checkDeviceTrust("@bob:example.com", "Dynabook");
|
||||
expect(bobDeviceTrust.isLocallyVerified()).toBeTruthy();
|
||||
expect(bobDeviceTrust.isCrossSigningVerified()).toBeFalsy();
|
||||
|
||||
const aliceTrust = bob.client.checkUserTrust("@alice:example.com");
|
||||
expect(aliceTrust.isCrossSigningVerified()).toBeTruthy();
|
||||
expect(aliceTrust.isTofu()).toBeTruthy();
|
||||
|
||||
const aliceDeviceTrust = bob.client.checkDeviceTrust("@alice:example.com", "Osborne2");
|
||||
expect(aliceDeviceTrust.isLocallyVerified()).toBeTruthy();
|
||||
expect(aliceDeviceTrust.isCrossSigningVerified()).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user