From 83649b891db5fcca7b96c606293925bc47358730 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 5 Apr 2023 14:42:46 -0400 Subject: Implement MSC3989 to redact the origin field. (#15393) This will be done in a future room version, for now an unstable room version is added which redacts the origin field. --- tests/events/test_utils.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/events/test_utils.py b/tests/events/test_utils.py index 4174a237ec..c35f58f462 100644 --- a/tests/events/test_utils.py +++ b/tests/events/test_utils.py @@ -143,6 +143,13 @@ class PruneEventTestCase(stdlib_unittest.TestCase): room_version=RoomVersions.MSC2176, ) + # As of MSC3989 we now redact the origin key. + self.run_test( + {"type": "A", "origin": "example.com"}, + {"type": "A", "content": {}, "signatures": {}, "unsigned": {}}, + room_version=RoomVersions.MSC3989, + ) + def test_unsigned(self) -> None: """Ensure that unsigned properties get stripped (except age_ts and replaces_state).""" self.run_test( -- cgit 1.4.1