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

Pass through room version to event auth#4482

Merged
erikjohnston merged 3 commits into
developfrom
erikj/event_auth_room_version
Jan 28, 2019
Merged

Pass through room version to event auth#4482
erikjohnston merged 3 commits into
developfrom
erikj/event_auth_room_version

Conversation

@erikjohnston
Copy link
Copy Markdown
Member

No description provided.

@erikjohnston erikjohnston requested a review from a team January 25, 2019 18:33
@codecov-io
Copy link
Copy Markdown

codecov-io commented Jan 25, 2019

Codecov Report

Merging #4482 into develop will increase coverage by 0.02%.
The diff coverage is 100%.

@@             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

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.

lgtm

Comment thread synapse/handlers/message.py Outdated
"""

if event.is_state() and (event.type, event.state_key) == (EventTypes.Create, ""):
room_version = event.content["room_version"]
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.

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.

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.

Fair, though I'd be surprised if we actually let people send a create event if they're not in the room.

@erikjohnston erikjohnston merged commit f1a0446 into develop Jan 28, 2019
@erikjohnston erikjohnston deleted the erikj/event_auth_room_version branch March 5, 2019 13:50
richvdh added a commit that referenced this pull request Jun 10, 2022
Instead, use the `room_version` property of the event we're validating.

The `room_version` was originally added as a parameter somewhere around #4482,
but really it's been redundant since #6875 added a `room_version` field to `EventBase`.
richvdh added a commit that referenced this pull request Jun 10, 2022
Instead, use the `room_version` property of the event we're checking.

The `room_version` was originally added as a parameter somewhere around #4482,
but really it's been redundant since #6875 added a `room_version` field to `EventBase`.
richvdh added a commit that referenced this pull request Jun 10, 2022
Instead, use the `room_version` property of the event we're checking.

The `room_version` was originally added as a parameter somewhere around #4482,
but really it's been redundant since #6875 added a `room_version` field to `EventBase`.
richvdh added a commit that referenced this pull request Jun 12, 2022
Instead, use the `room_version` property of the event we're validating.

The `room_version` was originally added as a parameter somewhere around #4482,
but really it's been redundant since #6875 added a `room_version` field to `EventBase`.
richvdh added a commit that referenced this pull request Jun 12, 2022
Instead, use the `room_version` property of the event we're checking.

The `room_version` was originally added as a parameter somewhere around #4482,
but really it's been redundant since #6875 added a `room_version` field to `EventBase`.
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