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

Commit

Permalink
Make 'event_id' a required parameter in federated state requests (#4741)
Browse files Browse the repository at this point in the history
* make 'event_id' a required parameter in federated state requests

As per the spec: https://matrix.org/docs/spec/server_server/r0.1.1.html#id40

Signed-off-by: Joseph Weston <[email protected]>

* add changelog entry for bugfix

Signed-off-by: Joseph Weston <[email protected]>

* Update server.py
  • Loading branch information
hawkowl authored Feb 27, 2019
1 parent 68f47d6 commit b131cc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/4740.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'event_id' is now a required parameter in federated state requests, as per the matrix spec.
4 changes: 2 additions & 2 deletions synapse/federation/transport/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def on_GET(self, origin, content, query, context):
return self.handler.on_context_state_request(
origin,
context,
parse_string_from_args(query, "event_id", None),
parse_string_from_args(query, "event_id", None, required=True),
)


Expand All @@ -404,7 +404,7 @@ def on_GET(self, origin, content, query, room_id):
return self.handler.on_state_ids_request(
origin,
room_id,
parse_string_from_args(query, "event_id", None),
parse_string_from_args(query, "event_id", None, required=True),
)


Expand Down

0 comments on commit b131cc7

Please sign in to comment.