diff options
author | Denis <dakariakin@gmail.com> | 2022-09-20 10:44:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-20 09:44:38 +0100 |
commit | c802ef14119b21cfdf8f5a9c246b695c98c0f718 (patch) | |
tree | 20deb7b9c36ce1a18245c016e549935c1e1d9bc7 | |
parent | Add support to purge rows from MSC2716 and other tables when purging a room (... (diff) | |
download | synapse-c802ef14119b21cfdf8f5a9c246b695c98c0f718.tar.xz |
Don't include redundant prev_state in new events (#13791)
-rw-r--r-- | changelog.d/13791.removal | 1 | ||||
-rw-r--r-- | synapse/events/builder.py | 1 | ||||
-rw-r--r-- | synapse/federation/federation_client.py | 3 |
3 files changed, 1 insertions, 4 deletions
diff --git a/changelog.d/13791.removal b/changelog.d/13791.removal new file mode 100644 index 0000000000..283226b63e --- /dev/null +++ b/changelog.d/13791.removal @@ -0,0 +1 @@ +Don't include redundant `prev_state` in new events. Contributed by Denis Kariakin (@dakariakin). diff --git a/synapse/events/builder.py b/synapse/events/builder.py index 746bd3978d..e2ee10dd3d 100644 --- a/synapse/events/builder.py +++ b/synapse/events/builder.py @@ -167,7 +167,6 @@ class EventBuilder: "content": self.content, "unsigned": self.unsigned, "depth": depth, - "prev_state": [], } if self.is_state(): diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py index 4a4289ee7c..464672a3da 100644 --- a/synapse/federation/federation_client.py +++ b/synapse/federation/federation_client.py @@ -906,9 +906,6 @@ class FederationClient(FederationBase): # The protoevent received over the JSON wire may not have all # the required fields. Lets just gloss over that because # there's some we never care about - if "prev_state" not in pdu_dict: - pdu_dict["prev_state"] = [] - ev = builder.create_local_event_from_event_dict( self._clock, self.hostname, |