mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Merge pull request #606 from matrix-org/markjh/get_enabled
Make sure we return a JSON object when returning the values of specif… …ic keys from a push rule
This commit is contained in:
commit
faa3d172ab
@ -324,7 +324,9 @@ def _filter_ruleset_with_path(ruleset, path):
|
|||||||
|
|
||||||
attr = path[0]
|
attr = path[0]
|
||||||
if attr in the_rule:
|
if attr in the_rule:
|
||||||
return the_rule[attr]
|
# Make sure we return a JSON object as the attribute may be a
|
||||||
|
# JSON value.
|
||||||
|
return {attr: the_rule[attr]}
|
||||||
else:
|
else:
|
||||||
raise UnrecognizedRequestError()
|
raise UnrecognizedRequestError()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user