This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Add room_version param to get_pdu#4448
Merged
Merged
Conversation
When we add new event format we'll need to know the event format or room version when parsing events.
Codecov Report
@@ Coverage Diff @@
## develop #4448 +/- ##
==========================================
+ Coverage 73.64% 74.8% +1.16%
==========================================
Files 302 336 +34
Lines 29818 34804 +4986
Branches 4895 5800 +905
==========================================
+ Hits 21960 26036 +4076
- Misses 6426 7149 +723
- Partials 1432 1619 +187 |
Member
Author
|
Split out from #4403 and address this review comment about making sure |
richvdh
approved these changes
Jan 24, 2019
Member
richvdh
left a comment
There was a problem hiding this comment.
looks generally sane, modulo question below
| create_event = e | ||
| break | ||
|
|
||
| room_version = create_event.content.get("room_version", RoomVersions.V1) |
Member
There was a problem hiding this comment.
is it possible for us to get here without a create_event (if the auth chain is faulty), in which case this will explode rather than failing sensibly?
Member
Author
There was a problem hiding this comment.
I don't believe so, but may as well add a check anyway.
| break | ||
|
|
||
| if room_version is None: | ||
| # We use this error has that is what |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When we add new event format we'll need to know the event format or room
version when parsing events.