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

Don't include redundant prev_state in new events #13791

Merged
merged 2 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions changelog.d/13791.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Don't include redundant `prev_state` in new events. Contributed by Denis Kariakin (@dakariakin).
1 change: 0 additions & 1 deletion synapse/events/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ async def build(
"content": self.content,
"unsigned": self.unsigned,
"depth": depth,
"prev_state": [],
}

if self.is_state():
Expand Down
3 changes: 0 additions & 3 deletions synapse/federation/federation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down