Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 28c6841

Browse files
authored
Send the m.room.create stripped event with invites (support MSC1772). (#9966)
MSC1772 specifies the m.room.create event should be sent as part of the invite_state. This was done optionally behind an experimental flag, but is now done by default due to MSC1772 being approved.
1 parent 652a6b0 commit 28c6841

File tree

5 files changed

+34
-5
lines changed

5 files changed

+34
-5
lines changed

UPGRADE.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,35 @@ for example:
8585
wget https://packages.matrix.org/debian/pool/main/m/matrix-synapse-py3/matrix-synapse-py3_1.3.0+stretch1_amd64.deb
8686
dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
8787
88+
Upgrading to v1.34.0
89+
====================
90+
91+
`room_invite_state_types` configuration setting
92+
-----------------------------------------------
93+
94+
The ``room_invite_state_types`` configuration setting has been deprecated and
95+
replaced with ``room_prejoin_state``. See the `sample configuration file <https://github.com/matrix-org/synapse/blob/v1.34.0/docs/sample_config.yaml#L1515>`_.
96+
97+
If you have set ``room_invite_state_types`` to the default value you should simply
98+
remove it from your configuration file. The default value used to be:
99+
100+
.. code:: yaml
101+
102+
room_invite_state_types:
103+
- "m.room.join_rules"
104+
- "m.room.canonical_alias"
105+
- "m.room.avatar"
106+
- "m.room.encryption"
107+
- "m.room.name"
108+
109+
If you have customised this value by adding addition state types, you should
110+
remove ``room_invite_state_types`` and configure ``additional_event_types`` with
111+
your customisations.
112+
113+
If you have customised this value by removing state types, you should rename
114+
``room_invite_state_types`` to ``additional_event_types``, and set
115+
``disable_default_event_types`` to ``true``.
116+
88117
Upgrading to v1.33.0
89118
====================
90119

changelog.d/9915.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Support stable identifiers from [MSC1772](https://github.com/matrix-org/matrix-doc/pull/1772).
1+
Support stable identifiers for [MSC1772](https://github.com/matrix-org/matrix-doc/pull/1772) Spaces. `m.space.child` events will now be taken into account when populating the experimental spaces summary response. Please see `UPGRADE.rst` if you have customised `room_invite_state_types` in your configuration.

changelog.d/9966.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Support stable identifiers for [MSC1772](https://github.com/matrix-org/matrix-doc/pull/1772) Spaces. `m.space.child` events will now be taken into account when populating the experimental spaces summary response. Please see `UPGRADE.rst` if you have customised `room_invite_state_types` in your configuration.

docs/sample_config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,6 +1521,7 @@ room_prejoin_state:
15211521
# - m.room.avatar
15221522
# - m.room.encryption
15231523
# - m.room.name
1524+
# - m.room.create
15241525
#
15251526
# Uncomment the following to disable these defaults (so that only the event
15261527
# types listed in 'additional_event_types' are shared). Defaults to 'false'.

synapse/config/api.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ def _get_prejoin_state_types(self, config: JsonDict) -> Iterable[str]:
8888
if not room_prejoin_state_config.get("disable_default_event_types"):
8989
yield from _DEFAULT_PREJOIN_STATE_TYPES
9090

91-
if self.spaces_enabled:
92-
# MSC1772 suggests adding m.room.create to the prejoin state
93-
yield EventTypes.Create
94-
9591
yield from room_prejoin_state_config.get("additional_event_types", [])
9692

9793

@@ -109,6 +105,8 @@ def _get_prejoin_state_types(self, config: JsonDict) -> Iterable[str]:
109105
EventTypes.RoomAvatar,
110106
EventTypes.RoomEncryption,
111107
EventTypes.Name,
108+
# Per MSC1772.
109+
EventTypes.Create,
112110
]
113111

114112

0 commit comments

Comments
 (0)