diff --git a/README.md b/README.md index f194a72715e..16f6de47ed2 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This is the [Matrix](https://matrix.org) Client-Server SDK for JavaScript and TypeScript. This SDK can be run in a browser or in Node.js. -#### Minimum Matrix server version: v1.1 +#### Minimum Matrix server version: v1.5 The Matrix specification is constantly evolving - while this SDK aims for maximum backwards compatibility, it only guarantees that a feature will be supported for at least 4 spec releases. For example, if a feature the js-sdk supports diff --git a/package.json b/package.json index ef4a1de8c26..574dfb24481 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ ], "dependencies": { "@babel/runtime": "^7.12.5", - "@matrix-org/matrix-sdk-crypto-wasm": "^3.5.0", + "@matrix-org/matrix-sdk-crypto-wasm": "^3.6.0", "another-json": "^0.2.0", "bs58": "^5.0.0", "content-type": "^1.0.4", diff --git a/spec/unit/autodiscovery.spec.ts b/spec/unit/autodiscovery.spec.ts index b7614d7240f..b4025218e66 100644 --- a/spec/unit/autodiscovery.spec.ts +++ b/spec/unit/autodiscovery.spec.ts @@ -351,7 +351,7 @@ describe("AutoDiscovery", function () { function () { const httpBackend = getHttpBackend(); httpBackend.when("GET", "/_matrix/client/versions").respond(200, { - not_matrix_versions: ["v1.1"], + not_matrix_versions: ["v1.5"], }); httpBackend.when("GET", "/.well-known/matrix/client").respond(200, { "m.homeserver": { @@ -388,7 +388,7 @@ describe("AutoDiscovery", function () { expect(req.path).toEqual("https://example.org/_matrix/client/versions"); }) .respond(200, { - versions: ["v1.1"], + versions: ["v1.5"], }); httpBackend.when("GET", "/.well-known/matrix/client").respond(200, { "m.homeserver": { @@ -428,7 +428,7 @@ describe("AutoDiscovery", function () { expect(req.path).toEqual("https://chat.example.org/_matrix/client/versions"); }) .respond(200, { - versions: ["v1.1"], + versions: ["v1.5"], }); httpBackend.when("GET", "/.well-known/matrix/client").respond(200, { "m.homeserver": { @@ -469,7 +469,7 @@ describe("AutoDiscovery", function () { expect(req.path).toEqual("https://chat.example.org/_matrix/client/versions"); }) .respond(200, { - versions: ["v1.1"], + versions: ["v1.5"], }); httpBackend.when("GET", "/.well-known/matrix/client").respond(200, { "m.homeserver": { @@ -515,7 +515,7 @@ describe("AutoDiscovery", function () { expect(req.path).toEqual("https://chat.example.org/_matrix/client/versions"); }) .respond(200, { - versions: ["v1.1"], + versions: ["v1.5"], }); httpBackend.when("GET", "/.well-known/matrix/client").respond(200, { "m.homeserver": { @@ -560,7 +560,7 @@ describe("AutoDiscovery", function () { expect(req.path).toEqual("https://chat.example.org/_matrix/client/versions"); }) .respond(200, { - versions: ["v1.1"], + versions: ["v1.5"], }); httpBackend.when("GET", "/.well-known/matrix/client").respond(200, { "m.homeserver": { @@ -606,7 +606,7 @@ describe("AutoDiscovery", function () { expect(req.path).toEqual("https://chat.example.org/_matrix/client/versions"); }) .respond(200, { - versions: ["v1.1"], + versions: ["v1.5"], }); httpBackend.when("GET", "/_matrix/identity/v2").respond(404, {}); httpBackend.when("GET", "/.well-known/matrix/client").respond(200, { @@ -653,7 +653,7 @@ describe("AutoDiscovery", function () { expect(req.path).toEqual("https://chat.example.org/_matrix/client/versions"); }) .respond(200, { - versions: ["v1.1"], + versions: ["v1.5"], }); httpBackend.when("GET", "/_matrix/identity/v2").respond(500, {}); httpBackend.when("GET", "/.well-known/matrix/client").respond(200, { @@ -697,7 +697,7 @@ describe("AutoDiscovery", function () { expect(req.path).toEqual("https://chat.example.org/_matrix/client/versions"); }) .respond(200, { - versions: ["v1.1"], + versions: ["v1.5"], }); httpBackend .when("GET", "/_matrix/identity/v2") @@ -747,7 +747,7 @@ describe("AutoDiscovery", function () { expect(req.path).toEqual("https://chat.example.org/_matrix/client/versions"); }) .respond(200, { - versions: ["v1.1"], + versions: ["v1.5"], }); httpBackend .when("GET", "/_matrix/identity/v2") @@ -910,7 +910,7 @@ describe("AutoDiscovery", function () { beforeEach(() => { fetchMock.resetBehavior(); - fetchMock.get(`${homeserverUrl}_matrix/client/versions`, { versions: ["v1.1"] }); + fetchMock.get(`${homeserverUrl}_matrix/client/versions`, { versions: ["v1.5"] }); fetchMock.get("https://example.org/.well-known/matrix/client", { "m.homeserver": { diff --git a/src/version-support.ts b/src/version-support.ts index dd2d55ad9e2..25fe72d70b5 100644 --- a/src/version-support.ts +++ b/src/version-support.ts @@ -16,5 +16,8 @@ limitations under the License. /** * The minimum Matrix specification version the js-sdk supports. + * + * (This means that we require any servers we connect to to declare support for this spec version, so it is important + * for it not to be too old, as well as not too new.) */ -export const MINIMUM_MATRIX_VERSION = "v1.1"; +export const MINIMUM_MATRIX_VERSION = "v1.5"; diff --git a/yarn.lock b/yarn.lock index 65902b4c290..961c03c5bb0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1675,10 +1675,10 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@matrix-org/matrix-sdk-crypto-wasm@^3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-3.5.0.tgz#997d63ae12304142513fe93c5e0872ff10ca30b4" - integrity sha512-7as0jJTje+rFu9AF8LEO0tmhtHcou2YQnZOtpiP+lS5rDfIPv5CL8/eb45fzDnbQybt9Jm5zdjBdiLBEaUg2dQ== +"@matrix-org/matrix-sdk-crypto-wasm@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-3.6.0.tgz#385aa579d7b7546d85c9b20bf6ba780f799bdda3" + integrity sha512-fvuYczcp/r/MOkOAUbK+tMaTerEe7/QHGQcRJz3W3JuEma0YN59d35zTBlts7EkN6Ichw1vLSyM+GkcbuosuyA== "@matrix-org/olm@3.2.15": version "3.2.15"