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

Invites and knocks will now include the topic in the stripped state
send to clients before joining the room.
This commit is contained in:
Patrick Cloke 2022-01-04 11:08:08 -05:00 committed by GitHub
parent 13c974ed35
commit 8422a7f7f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1 @@
Include the room topic in the stripped state included with invites and knocking.

View File

@ -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'.

View File

@ -107,6 +107,8 @@ _DEFAULT_PREJOIN_STATE_TYPES = [
EventTypes.Name,
# Per MSC1772.
EventTypes.Create,
# Per MSC3173.
EventTypes.Topic,
]

View File

@ -108,6 +108,15 @@ class KnockingStrippedStateEventHelperMixin(TestCase):
"state_key": "",
},
),
(
EventTypes.Topic,
{
"content": {
"topic": "A really cool room",
},
"state_key": "",
},
),
]
)