diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-07-14 09:09:19 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-14 09:09:19 +1000 |
commit | 8532953c048ba8dc258d57d18e56e2243c41b085 (patch) | |
tree | 1de20a1972e313b196b2c5abcacb5d40413a8b36 /synapse/federation/federation_base.py | |
parent | Make auth & transactions more testable (#3499) (diff) | |
parent | fix sytests (diff) | |
download | synapse-8532953c048ba8dc258d57d18e56e2243c41b085.tar.xz |
Merge pull request #3534 from krombel/use_parse_and_asserts_from_servlet
Use parse and asserts from http.servlet
Diffstat (limited to 'synapse/federation/federation_base.py')
-rw-r--r-- | synapse/federation/federation_base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/federation/federation_base.py b/synapse/federation/federation_base.py index f0c7a06718..c11798093d 100644 --- a/synapse/federation/federation_base.py +++ b/synapse/federation/federation_base.py @@ -23,7 +23,7 @@ from synapse.api.errors import Codes, SynapseError from synapse.crypto.event_signing import check_event_content_hash from synapse.events import FrozenEvent from synapse.events.utils import prune_event -from synapse.http.servlet import assert_params_in_request +from synapse.http.servlet import assert_params_in_dict from synapse.util import logcontext, unwrapFirstError logger = logging.getLogger(__name__) @@ -199,7 +199,7 @@ def event_from_pdu_json(pdu_json, outlier=False): """ # we could probably enforce a bunch of other fields here (room_id, sender, # origin, etc etc) - assert_params_in_request(pdu_json, ('event_id', 'type', 'depth')) + assert_params_in_dict(pdu_json, ('event_id', 'type', 'depth')) depth = pdu_json['depth'] if not isinstance(depth, six.integer_types): |