-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Pass through room version to event auth #4482
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4482 +/- ##
===========================================
+ Coverage 74.71% 74.74% +0.02%
===========================================
Files 336 336
Lines 34102 34152 +50
Branches 5544 5554 +10
===========================================
+ Hits 25481 25527 +46
Misses 7048 7048
- Partials 1573 1577 +4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
synapse/handlers/message.py
Outdated
@@ -611,8 +611,13 @@ def handle_new_client_event( | |||
extra_users (list(UserID)): Any extra users to notify about event | |||
""" | |||
|
|||
if event.is_state() and (event.type, event.state_key) == (EventTypes.Create, ""): | |||
room_version = event.content["room_version"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reckon you can get here without there being a room_version
, if you hit PUT /rooms/<room_id>/state/m.room.create
. Obviously that's a silly thing to do, but blowing up with an exception doesn't seem like the right thing to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair, though I'd be surprised if we actually let people send a create event if they're not in the room.
No description provided.