Support Matrix 1.1 (drop legacy r0 versions) (#9819)

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Travis Ralston 2023-08-14 02:25:13 -06:00 committed by GitHub
parent f9e79fd5d6
commit 180fcaa70f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 712 additions and 440 deletions

View file

@ -59,6 +59,7 @@ describe("<MatrixChat />", () => {
// reused in createClient mock below
const getMockClientMethods = () => ({
...mockClientMethodsUser(userId),
getVersions: jest.fn().mockResolvedValue({ versions: ["v1.1"] }),
startClient: jest.fn(),
stopClient: jest.fn(),
setCanResetTimelineCallback: jest.fn(),
@ -178,7 +179,7 @@ describe("<MatrixChat />", () => {
mockClient = getMockClientWithEventEmitter(getMockClientMethods());
fetchMock.get("https://test.com/_matrix/client/versions", {
unstable_features: {},
versions: [],
versions: ["v1.1"],
});
localStorageSetSpy = jest.spyOn(localStorage.__proto__, "setItem");
localStorageGetSpy = jest.spyOn(localStorage.__proto__, "getItem").mockReturnValue(undefined);