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

Commit

Permalink
Don't include redundant prev_state in new events (#13791)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakariakin authored Sep 20, 2022
1 parent 44be423 commit c802ef1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
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

0 comments on commit c802ef1

Please sign in to comment.