Broaden support for matrix spec versions (#12154)

Something of a compainion to
https://github.com/matrix-org/matrix-js-sdk/pull/4014, but also covering the
issues discussed at
https://github.com/matrix-org/matrix-js-sdk/issues/3915#issuecomment-1865221366.

In short: we should not reject servers which only implement recent versions of
the spec. Doing so holds back the ecosystem by requiring all new servers to
implement features that nobody actually uses any more.
This commit is contained in:
Richard van der Hoff 2024-01-19 10:00:22 +00:00 committed by GitHub
parent 0d2253e7d0
commit a8cc6cc207
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 31 additions and 29 deletions

View file

@ -453,10 +453,7 @@ describe("Lifecycle", () => {
it("should show a toast if the matrix server version is unsupported", async () => {
const toastSpy = jest.spyOn(ToastStore.sharedInstance(), "addOrReplaceToast");
mockClient.getVersions.mockResolvedValue({
versions: ["r0.6.0"],
unstable_features: {},
});
mockClient.isVersionSupported.mockImplementation(async (version) => version == "r0.6.0");
initLocalStorageMock({ ...localStorageSession });
expect(await restoreFromLocalStorage()).toEqual(true);