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

Include the topic event in the prejoin state, per MSC3173. #11666

Merged
merged 4 commits into from
Jan 4, 2022
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/11666.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Include the room topic in the stripped state included with invites and knocking.
1 change: 1 addition & 0 deletions docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1488,6 +1488,7 @@ room_prejoin_state:
# - m.room.encryption
# - m.room.name
# - m.room.create
# - m.room.topic
#
# Uncomment the following to disable these defaults (so that only the event
# types listed in 'additional_event_types' are shared). Defaults to 'false'.
Expand Down
2 changes: 2 additions & 0 deletions synapse/config/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ def _get_prejoin_state_types(self, config: JsonDict) -> Iterable[str]:
EventTypes.Name,
# Per MSC1772.
EventTypes.Create,
# Per MSC3173.
EventTypes.Topic,
]


Expand Down
9 changes: 9 additions & 0 deletions tests/federation/transport/test_knocking.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ def send_example_state_events_to_room(
"state_key": "",
},
),
(
EventTypes.Topic,
{
"content": {
"topic": "A really cool room",
},
"state_key": "",
},
),
]
)

Expand Down