From 9dd1c35770aa769fe5e7772ed25f61e386333057 Mon Sep 17 00:00:00 2001 From: Denis Kariakin Date: Tue, 13 Sep 2022 12:00:36 +0200 Subject: [PATCH 1/2] Don't include redundant prev_state in new events --- synapse/events/builder.py | 1 - synapse/federation/federation_client.py | 3 --- 2 files changed, 4 deletions(-) diff --git a/synapse/events/builder.py b/synapse/events/builder.py index 746bd3978d96..e2ee10dd3ddc 100644 --- a/synapse/events/builder.py +++ b/synapse/events/builder.py @@ -167,7 +167,6 @@ async def build( "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 4a4289ee7cdd..464672a3da81 100644 --- a/synapse/federation/federation_client.py +++ b/synapse/federation/federation_client.py @@ -906,9 +906,6 @@ async def send_request(destination: str) -> Tuple[str, EventBase, RoomVersion]: # 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, From 03f6bbbfe71ca813a88685ef42880f4e228aabde Mon Sep 17 00:00:00 2001 From: Denis Kariakin Date: Tue, 13 Sep 2022 13:20:46 +0200 Subject: [PATCH 2/2] Added changelog --- changelog.d/13791.removal | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/13791.removal diff --git a/changelog.d/13791.removal b/changelog.d/13791.removal new file mode 100644 index 000000000000..283226b63e72 --- /dev/null +++ b/changelog.d/13791.removal @@ -0,0 +1 @@ +Don't include redundant `prev_state` in new events. Contributed by Denis Kariakin (@dakariakin).