summary refs log tree commit diff
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-01-04 11:08:08 -0500
committerGitHub <noreply@github.com>2022-01-04 11:08:08 -0500
commit8422a7f7f6154bcbadc52f0d0d27b8e6b989cb4c (patch)
tree2e598a44bff193fa7158ed668480c4efbf80298a
parentDrop Bionic from Debian builds (#11633) (diff)
downloadsynapse-8422a7f7f6154bcbadc52f0d0d27b8e6b989cb4c.tar.xz
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.
-rw-r--r--changelog.d/11666.feature1
-rw-r--r--docs/sample_config.yaml1
-rw-r--r--synapse/config/api.py2
-rw-r--r--tests/federation/transport/test_knocking.py9
4 files changed, 13 insertions, 0 deletions
diff --git a/changelog.d/11666.feature b/changelog.d/11666.feature
new file mode 100644

index 0000000000..6f6b127e22 --- /dev/null +++ b/changelog.d/11666.feature
@@ -0,0 +1 @@ +Include the room topic in the stripped state included with invites and knocking. diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml
index 6696ed5d1e..00dfd2c013 100644 --- a/docs/sample_config.yaml +++ b/docs/sample_config.yaml
@@ -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'. diff --git a/synapse/config/api.py b/synapse/config/api.py
index b18044f982..25538b82d5 100644 --- a/synapse/config/api.py +++ b/synapse/config/api.py
@@ -107,6 +107,8 @@ _DEFAULT_PREJOIN_STATE_TYPES = [ EventTypes.Name, # Per MSC1772. EventTypes.Create, + # Per MSC3173. + EventTypes.Topic, ] diff --git a/tests/federation/transport/test_knocking.py b/tests/federation/transport/test_knocking.py
index 663960ff53..bfa156eebb 100644 --- a/tests/federation/transport/test_knocking.py +++ b/tests/federation/transport/test_knocking.py
@@ -108,6 +108,15 @@ class KnockingStrippedStateEventHelperMixin(TestCase): "state_key": "", }, ), + ( + EventTypes.Topic, + { + "content": { + "topic": "A really cool room", + }, + "state_key": "", + }, + ), ] )