From 3b9b89b92a1abdcf60998a06a544a48720d53253 Mon Sep 17 00:00:00 2001 From: Catalan Lover Date: Sun, 9 Oct 2022 23:02:20 +0200 Subject: [PATCH 01/11] Change Documentation to have v10 as default room version --- docs/usage/configuration/config_documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/configuration/config_documentation.md b/docs/usage/configuration/config_documentation.md index df3a62b27e3f..2b8b70bf5a88 100644 --- a/docs/usage/configuration/config_documentation.md +++ b/docs/usage/configuration/config_documentation.md @@ -295,7 +295,7 @@ Known room versions are listed [here](https://spec.matrix.org/latest/rooms/#comp For example, for room version 1, `default_room_version` should be set to "1". -Currently defaults to "9". +Currently defaults to "10". Example configuration: ```yaml From f9f8f430328715edaf6005fc5320601e755cc579 Mon Sep 17 00:00:00 2001 From: Catalan Lover Date: Sun, 9 Oct 2022 23:02:58 +0200 Subject: [PATCH 02/11] Change Default Room version to 10 --- synapse/config/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/config/server.py b/synapse/config/server.py index f2353ce5fb0a..491f0547d9eb 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -151,7 +151,7 @@ def generate_ip_set( "fec0::/10", ] -DEFAULT_ROOM_VERSION = "9" +DEFAULT_ROOM_VERSION = "10" ROOM_COMPLEXITY_TOO_GREAT = ( "Your homeserver is unable to join rooms this large or complex. " From 6ba8b63d7300b2e1dea9a78fa3abb344296b84c7 Mon Sep 17 00:00:00 2001 From: Catalan Lover Date: Sun, 9 Oct 2022 23:23:15 +0200 Subject: [PATCH 03/11] Add changelog entry for default room version swap --- changelog.d/14111.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/14111.feature diff --git a/changelog.d/14111.feature b/changelog.d/14111.feature new file mode 100644 index 000000000000..46699de19ef2 --- /dev/null +++ b/changelog.d/14111.feature @@ -0,0 +1 @@ +Make room version 10 default. Implements MSC3904. Contributed by @FSG-Cat. \ No newline at end of file From b52e93ee67eabb2543e6dbf19fec2a9b43e95959 Mon Sep 17 00:00:00 2001 From: Catalan Lover Date: Sun, 9 Oct 2022 23:24:47 +0200 Subject: [PATCH 04/11] Add changelog entry for v10 default room version in docs --- changelog.d/14111.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/14111.doc diff --git a/changelog.d/14111.doc b/changelog.d/14111.doc new file mode 100644 index 000000000000..35b6c510d9ae --- /dev/null +++ b/changelog.d/14111.doc @@ -0,0 +1 @@ +Change documentation to reflect that room version 10 is now default. Contributed by @FSG-Cat. \ No newline at end of file From ab0ed9ba5bbbf1cd4631757bb3e88d7f25cdb0b3 Mon Sep 17 00:00:00 2001 From: Catalan Lover <48515417+FSG-Cat@users.noreply.github.com> Date: Mon, 10 Oct 2022 11:51:06 +0200 Subject: [PATCH 05/11] Clarify doc changelog entry Co-authored-by: David Robertson --- changelog.d/14111.doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/14111.doc b/changelog.d/14111.doc index 35b6c510d9ae..57e37640d1b9 100644 --- a/changelog.d/14111.doc +++ b/changelog.d/14111.doc @@ -1 +1 @@ -Change documentation to reflect that room version 10 is now default. Contributed by @FSG-Cat. \ No newline at end of file +Mark [room version 10](https://spec.matrix.org/v1.4/rooms/v10/) as the default room version. Contributed by @FSG-Cat. \ No newline at end of file From bde1711f18972751026dde2d43ede2cc44d83ee3 Mon Sep 17 00:00:00 2001 From: Catalan Lover <48515417+FSG-Cat@users.noreply.github.com> Date: Mon, 10 Oct 2022 11:52:17 +0200 Subject: [PATCH 06/11] Improve Documentation changes. Co-authored-by: David Robertson --- docs/usage/configuration/config_documentation.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/usage/configuration/config_documentation.md b/docs/usage/configuration/config_documentation.md index 2b8b70bf5a88..63dc4d157bfb 100644 --- a/docs/usage/configuration/config_documentation.md +++ b/docs/usage/configuration/config_documentation.md @@ -295,7 +295,9 @@ Known room versions are listed [here](https://spec.matrix.org/latest/rooms/#comp For example, for room version 1, `default_room_version` should be set to "1". -Currently defaults to "10". +Currently defaults to ["10"](https://spec.matrix.org/v1.4/rooms/v10/). + +_Changed in Synapse X.Y:_ the default version room version was increased from [9](https://spec.matrix.org/v1.4/rooms/v9/) to [10](https://spec.matrix.org/v1.4/rooms/v10/). Example configuration: ```yaml From 975328bee414fc62fba2c80446e79e3882adbbcb Mon Sep 17 00:00:00 2001 From: Catalan Lover <48515417+FSG-Cat@users.noreply.github.com> Date: Wed, 4 Jan 2023 13:44:31 +0100 Subject: [PATCH 07/11] Update Changelog entry to have correct format Co-authored-by: David Robertson --- changelog.d/14111.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/14111.feature b/changelog.d/14111.feature index 46699de19ef2..02746e633b3f 100644 --- a/changelog.d/14111.feature +++ b/changelog.d/14111.feature @@ -1 +1 @@ -Make room version 10 default. Implements MSC3904. Contributed by @FSG-Cat. \ No newline at end of file +Update the default room version to [v10](https://spec.matrix.org/v1.4/rooms/v10/) ([MSC 3904](https://github.com/matrix-org/matrix-spec-proposals/pull/3904)). Contributed by @FSG-Cat. \ No newline at end of file From aa169975ead1d2204af7467b0977e3700c1e9769 Mon Sep 17 00:00:00 2001 From: Catalan Lover Date: Wed, 4 Jan 2023 13:56:14 +0100 Subject: [PATCH 08/11] Update Spec Version to 1.5 --- changelog.d/14111.doc | 2 +- changelog.d/14111.feature | 2 +- docs/usage/configuration/config_documentation.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/changelog.d/14111.doc b/changelog.d/14111.doc index 57e37640d1b9..9b9741831d7a 100644 --- a/changelog.d/14111.doc +++ b/changelog.d/14111.doc @@ -1 +1 @@ -Mark [room version 10](https://spec.matrix.org/v1.4/rooms/v10/) as the default room version. Contributed by @FSG-Cat. \ No newline at end of file +Mark [room version 10](https://spec.matrix.org/v1.5/rooms/v10/) as the default room version. Contributed by @FSG-Cat. \ No newline at end of file diff --git a/changelog.d/14111.feature b/changelog.d/14111.feature index 02746e633b3f..0a794701a769 100644 --- a/changelog.d/14111.feature +++ b/changelog.d/14111.feature @@ -1 +1 @@ -Update the default room version to [v10](https://spec.matrix.org/v1.4/rooms/v10/) ([MSC 3904](https://github.com/matrix-org/matrix-spec-proposals/pull/3904)). Contributed by @FSG-Cat. \ No newline at end of file +Update the default room version to [v10](https://spec.matrix.org/v1.5/rooms/v10/) ([MSC 3904](https://github.com/matrix-org/matrix-spec-proposals/pull/3904)). Contributed by @FSG-Cat. \ No newline at end of file diff --git a/docs/usage/configuration/config_documentation.md b/docs/usage/configuration/config_documentation.md index 63dc4d157bfb..eb6e2dc826d2 100644 --- a/docs/usage/configuration/config_documentation.md +++ b/docs/usage/configuration/config_documentation.md @@ -295,9 +295,9 @@ Known room versions are listed [here](https://spec.matrix.org/latest/rooms/#comp For example, for room version 1, `default_room_version` should be set to "1". -Currently defaults to ["10"](https://spec.matrix.org/v1.4/rooms/v10/). +Currently defaults to ["10"](https://spec.matrix.org/v1.5/rooms/v10/). -_Changed in Synapse X.Y:_ the default version room version was increased from [9](https://spec.matrix.org/v1.4/rooms/v9/) to [10](https://spec.matrix.org/v1.4/rooms/v10/). +_Changed in Synapse X.Y:_ the default version room version was increased from [9](https://spec.matrix.org/v1.5/rooms/v9/) to [10](https://spec.matrix.org/v1.5/rooms/v10/). Example configuration: ```yaml From a06307ff40916fe6b07be995ae8e6f768bba82da Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 18 Jan 2023 11:08:47 -0500 Subject: [PATCH 09/11] Only need 1 changelog. --- changelog.d/14111.doc | 1 - 1 file changed, 1 deletion(-) delete mode 100644 changelog.d/14111.doc diff --git a/changelog.d/14111.doc b/changelog.d/14111.doc deleted file mode 100644 index 9b9741831d7a..000000000000 --- a/changelog.d/14111.doc +++ /dev/null @@ -1 +0,0 @@ -Mark [room version 10](https://spec.matrix.org/v1.5/rooms/v10/) as the default room version. Contributed by @FSG-Cat. \ No newline at end of file From 9b0a5fa1bea5b20523946b352c56b8117303c651 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 18 Jan 2023 11:13:28 -0500 Subject: [PATCH 10/11] Fix test. --- tests/rest/client/test_upgrade_room.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/rest/client/test_upgrade_room.py b/tests/rest/client/test_upgrade_room.py index 5e7bf97482b5..5ec343dd7fd2 100644 --- a/tests/rest/client/test_upgrade_room.py +++ b/tests/rest/client/test_upgrade_room.py @@ -199,9 +199,15 @@ def test_power_levels_tombstone(self) -> None: def test_stringy_power_levels(self) -> None: """The room upgrade converts stringy power levels to proper integers.""" + # Create a room on room version < 10. + room_id = self.helper.create_room_as( + self.creator, tok=self.creator_token, room_version="9" + ) + self.helper.join(room_id, self.other, tok=self.other_token) + # Retrieve the room's current power levels. power_levels = self.helper.get_state( - self.room_id, + room_id, "m.room.power_levels", tok=self.creator_token, ) @@ -217,14 +223,14 @@ def test_stringy_power_levels(self) -> None: # conscience, we ought to ensure it's upgrading from a sufficiently old # version of room. self.helper.send_state( - self.room_id, + room_id, "m.room.power_levels", body=power_levels, tok=self.creator_token, ) # Upgrade the room. Check the homeserver reports success. - channel = self._upgrade_room() + channel = self._upgrade_room(room_id=room_id) self.assertEqual(200, channel.code, channel.result) # Extract the new room ID. From 0bfda5b9dafbb8ce1cfcbea80159312145e58729 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Wed, 18 Jan 2023 16:20:43 +0000 Subject: [PATCH 11/11] Update "Changed in" line --- docs/usage/configuration/config_documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/configuration/config_documentation.md b/docs/usage/configuration/config_documentation.md index 1ce085e2f5f2..2883f76a26cd 100644 --- a/docs/usage/configuration/config_documentation.md +++ b/docs/usage/configuration/config_documentation.md @@ -297,7 +297,7 @@ to "1". Currently defaults to ["10"](https://spec.matrix.org/v1.5/rooms/v10/). -_Changed in Synapse X.Y:_ the default version room version was increased from [9](https://spec.matrix.org/v1.5/rooms/v9/) to [10](https://spec.matrix.org/v1.5/rooms/v10/). +_Changed in Synapse 1.76:_ the default version room version was increased from [9](https://spec.matrix.org/v1.5/rooms/v9/) to [10](https://spec.matrix.org/v1.5/rooms/v10/). Example configuration: ```yaml