diff options
author | Matthew Hodgson <matthew@arasphere.net> | 2018-07-23 10:03:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-23 10:03:28 +0100 |
commit | 9b34f3ea3af233d70412565290468092cf3c5984 (patch) | |
tree | dcfc00333a843cdc3a011249ef78f8438804dbd4 /synapse/rest/client/v1/push_rule.py | |
parent | add trailing comma (diff) | |
parent | Make the rest of the .iterwhatever go away (#3562) (diff) | |
download | synapse-9b34f3ea3af233d70412565290468092cf3c5984.tar.xz |
Merge branch 'develop' into matthew/sync_deleted_devices
Diffstat (limited to 'synapse/rest/client/v1/push_rule.py')
-rw-r--r-- | synapse/rest/client/v1/push_rule.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/rest/client/v1/push_rule.py b/synapse/rest/client/v1/push_rule.py index 0df7ce570f..6e95d9bec2 100644 --- a/synapse/rest/client/v1/push_rule.py +++ b/synapse/rest/client/v1/push_rule.py @@ -21,7 +21,7 @@ from synapse.api.errors import ( SynapseError, UnrecognizedRequestError, ) -from synapse.http.servlet import parse_json_value_from_request +from synapse.http.servlet import parse_json_value_from_request, parse_string from synapse.push.baserules import BASE_RULE_IDS from synapse.push.clientformat import format_push_rules_for_user from synapse.push.rulekinds import PRIORITY_CLASS_MAP @@ -75,13 +75,13 @@ class PushRuleRestServlet(ClientV1RestServlet): except InvalidRuleException as e: raise SynapseError(400, e.message) - before = request.args.get("before", None) + before = parse_string(request, "before") if before: - before = _namespaced_rule_id(spec, before[0]) + before = _namespaced_rule_id(spec, before) - after = request.args.get("after", None) + after = parse_string(request, "after") if after: - after = _namespaced_rule_id(spec, after[0]) + after = _namespaced_rule_id(spec, after) try: yield self.store.add_push_rule( |