mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 14:04:55 -04:00
Restricted rooms (MSC3083) should not have their allow key redacted. (#10489)
This commit is contained in:
parent
c3b037795a
commit
752fe0cd98
3 changed files with 46 additions and 0 deletions
|
@ -301,6 +301,49 @@ class PruneEventTestCase(unittest.TestCase):
|
|||
room_version=RoomVersions.MSC2176,
|
||||
)
|
||||
|
||||
def test_join_rules(self):
|
||||
"""Join rules events have changed behavior starting with MSC3083."""
|
||||
self.run_test(
|
||||
{
|
||||
"type": "m.room.join_rules",
|
||||
"event_id": "$test:domain",
|
||||
"content": {
|
||||
"join_rule": "invite",
|
||||
"allow": [],
|
||||
"other_key": "stripped",
|
||||
},
|
||||
},
|
||||
{
|
||||
"type": "m.room.join_rules",
|
||||
"event_id": "$test:domain",
|
||||
"content": {"join_rule": "invite"},
|
||||
"signatures": {},
|
||||
"unsigned": {},
|
||||
},
|
||||
)
|
||||
|
||||
# After MSC3083, alias events have no special behavior.
|
||||
self.run_test(
|
||||
{
|
||||
"type": "m.room.join_rules",
|
||||
"content": {
|
||||
"join_rule": "invite",
|
||||
"allow": [],
|
||||
"other_key": "stripped",
|
||||
},
|
||||
},
|
||||
{
|
||||
"type": "m.room.join_rules",
|
||||
"content": {
|
||||
"join_rule": "invite",
|
||||
"allow": [],
|
||||
},
|
||||
"signatures": {},
|
||||
"unsigned": {},
|
||||
},
|
||||
room_version=RoomVersions.MSC3083,
|
||||
)
|
||||
|
||||
|
||||
class SerializeEventTestCase(unittest.TestCase):
|
||||
def serialize(self, ev, fields):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue