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

Require event format version to parse or create events #4470

Merged
merged 4 commits into from
Jan 25, 2019

Conversation

erikjohnston
Copy link
Member

The vast majority of this PR is simply adding in the format version when parsing events from federation. Otherwise, the actual changes are just the ones in synapse/events/__init__.py

This was #4451 before I accidentally hit merge on that one....

@erikjohnston erikjohnston requested a review from a team January 25, 2019 10:39
@codecov-io
Copy link

Codecov Report

Merging #4470 into develop will decrease coverage by <.01%.
The diff coverage is 76.25%.

@@             Coverage Diff             @@
##           develop    #4470      +/-   ##
===========================================
- Coverage    74.77%   74.76%   -0.01%     
===========================================
  Files          336      336              
  Lines        34031    34071      +40     
  Branches      5534     5538       +4     
===========================================
+ Hits         25446    25474      +28     
- Misses        7015     7025      +10     
- Partials      1570     1572       +2

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks plausible I think

@@ -58,7 +85,29 @@ def create_event_id(self):

return e_id.to_string()

def new(self, key_values={}):
def new(self, room_version, key_values={}):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one to fix another time, but this default for key_values looks disastrous, since we modify it and the modifications will get reused next time it is called.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! Will fix that in another PR

@erikjohnston erikjohnston merged commit b6dce9b into develop Jan 25, 2019
erikjohnston added a commit that referenced this pull request Jan 29, 2019
This bug was introduced in PR #4470, commit 678a92c
@erikjohnston
Copy link
Member Author

This PR introduced a bug fixed in b6b73a0

@erikjohnston erikjohnston deleted the erikj/require_format_version branch March 5, 2019 13:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants