You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-07 21:23:00 +03:00
Remove dependency on org.matrix.e2e_cross_signing
unstable feature (#10593)
* Remove dependency on `org.matrix.e2e_cross_signing` unstable feature Currently, we have some code that relies on the server declaring support for an `unstable_feature` called `org.matrix.e2e_cross_signing`. There is nothing in the spec that requires this, so this would make us incompatible with some server implementations. The features in question were added in spec v1.1, so we can test for that instead. * fix unit test
This commit is contained in:
committed by
GitHub
parent
70b87f8bde
commit
6b451afc50
@@ -80,7 +80,7 @@ describe("DeviceListener", () => {
|
||||
getUserId: jest.fn().mockReturnValue(userId),
|
||||
getKeyBackupVersion: jest.fn().mockResolvedValue(undefined),
|
||||
getRooms: jest.fn().mockReturnValue([]),
|
||||
doesServerSupportUnstableFeature: jest.fn().mockResolvedValue(true),
|
||||
isVersionSupported: jest.fn().mockResolvedValue(true),
|
||||
isCrossSigningReady: jest.fn().mockResolvedValue(true),
|
||||
isSecretStorageReady: jest.fn().mockResolvedValue(true),
|
||||
isCryptoEnabled: jest.fn().mockReturnValue(true),
|
||||
@@ -234,9 +234,10 @@ describe("DeviceListener", () => {
|
||||
|
||||
describe("recheck", () => {
|
||||
it("does nothing when cross signing feature is not supported", async () => {
|
||||
mockClient!.doesServerSupportUnstableFeature.mockResolvedValue(false);
|
||||
mockClient!.isVersionSupported.mockResolvedValue(false);
|
||||
await createAndStart();
|
||||
|
||||
expect(mockClient!.isVersionSupported).toHaveBeenCalledWith("v1.1");
|
||||
expect(mockClient!.isCrossSigningReady).not.toHaveBeenCalled();
|
||||
});
|
||||
it("does nothing when crypto is not enabled", async () => {
|
||||
|
Reference in New Issue
Block a user