Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/14111.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
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.
4 changes: 3 additions & 1 deletion docs/usage/configuration/config_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 "9".
Currently defaults 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
Expand Down
2 changes: 1 addition & 1 deletion synapse/config/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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. "
Expand Down
12 changes: 9 additions & 3 deletions tests/rest/client/test_upgrade_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -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.
Expand Down