diff options
author | David Baker <dave@matrix.org> | 2015-02-05 15:11:38 +0000 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-02-05 15:11:38 +0000 |
commit | aaf50bf6f3d6adee92fa4d5cb55dbf3c5a13dbe3 (patch) | |
tree | e75934b0a4650e6698fb66bc3bb6bb238ecffebf /synapse/rest/client/v1/push_rule.py | |
parent | Server default rules now of all kinds rather than all being at lowest prio. (diff) | |
download | synapse-aaf50bf6f3d6adee92fa4d5cb55dbf3c5a13dbe3.tar.xz |
Give server default rules the 'default' attribute and fix various brokenness.
Diffstat (limited to 'synapse/rest/client/v1/push_rule.py')
-rw-r--r-- | synapse/rest/client/v1/push_rule.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/push_rule.py b/synapse/rest/client/v1/push_rule.py index 7ab167ce03..80f116b1ed 100644 --- a/synapse/rest/client/v1/push_rule.py +++ b/synapse/rest/client/v1/push_rule.py @@ -345,7 +345,7 @@ def _priority_class_to_template_name(pc): def _rule_to_template(rule): unscoped_rule_id = None if 'rule_id' in rule: - _rule_id_from_namespaced(rule['rule_id']) + unscoped_rule_id = _rule_id_from_namespaced(rule['rule_id']) template_name = _priority_class_to_template_name(rule['priority_class']) if template_name in ['override', 'underride']: @@ -364,6 +364,8 @@ def _rule_to_template(rule): if unscoped_rule_id: templaterule['rule_id'] = unscoped_rule_id + if 'default' in rule: + templaterule['default'] = rule['default'] return templaterule |