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

Implement MSC3821 to update redaction rules (third_party_invite.signed) #15563

Merged
merged 6 commits into from
May 15, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Use more realistic data in tests.
  • Loading branch information
clokep committed May 15, 2023
commit 58f8783b5111a4a3fd95ea595cdf1b329bb78624
20 changes: 15 additions & 5 deletions tests/events/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,23 +437,33 @@ def test_member(self) -> None:

# After MSC3821, the signed key under third_party_invite is protected
# from redaction.
THIRD_PARTY_INVITE = {
"display_name": "alice",
"signed": {
"mxid": "@alice:example.org",
"signatures": {
"magic.forest": {
"ed25519:3": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg"
}
},
"token": "abc123",
},
}

self.run_test(
{
"type": "m.room.member",
"content": {
"membership": "invite",
"third_party_invite": {
"signed": "foo",
"display_name": "stripped",
},
"third_party_invite": THIRD_PARTY_INVITE,
"other_key": "stripped",
},
},
{
"type": "m.room.member",
"content": {
"membership": "invite",
"third_party_invite": {"signed": "foo"},
"third_party_invite": {"signed": THIRD_PARTY_INVITE["signed"]},
},
"signatures": {},
"unsigned": {},
Expand Down