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
erikjohnston merged 4 commits into
developfrom
erikj/require_format_version
Jan 25, 2019
Merged

Require event format version to parse or create events#4470
erikjohnston merged 4 commits into
developfrom
erikj/require_format_version

Conversation

@erikjohnston
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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

Comment thread synapse/events/builder.py
return e_id.to_string()

def new(self, key_values={}):
def new(self, room_version, key_values={}):
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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