diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-04-13 09:47:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-13 13:47:07 +0000 |
commit | 2503126d5245586b89c76e5f15f27c0a07774a45 (patch) | |
tree | ee7a73d442e06dc9aff2597e97e8cf809c8a5ed0 /synapse/events/builder.py | |
parent | Only load the SSO redirect servlet if SSO is enabled. (#15421) (diff) | |
download | synapse-2503126d5245586b89c76e5f15f27c0a07774a45.tar.xz |
Implement MSC2174: move redacts to a content property. (#15395)
This moves `redacts` from being a top-level property to a `content` property in a new room version. MSC2176 (which was previously implemented) states to not `redact` this property.
Diffstat (limited to 'synapse/events/builder.py')
-rw-r--r-- | synapse/events/builder.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/events/builder.py b/synapse/events/builder.py index c82745275f..a254548c6c 100644 --- a/synapse/events/builder.py +++ b/synapse/events/builder.py @@ -173,7 +173,9 @@ class EventBuilder: if self.is_state(): event_dict["state_key"] = self._state_key - if self._redacts is not None: + # MSC2174 moves the redacts property to the content, it is invalid to + # provide it as a top-level property. + if self._redacts is not None and not self.room_version.msc2176_redaction_rules: event_dict["redacts"] = self._redacts if self._origin_server_ts is not None: |