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

Commit

Permalink
Include the topic event in the prejoin state, per MSC3173. (#11666)
Browse files Browse the repository at this point in the history
Invites and knocks will now include the topic in the stripped state
send to clients before joining the room.
  • Loading branch information
clokep authored Jan 4, 2022
1 parent 13c974e commit 8422a7f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
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

0 comments on commit 8422a7f

Please # to comment.