diff options
author | Erik Johnston <erik@matrix.org> | 2015-05-26 16:03:32 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-05-26 16:03:32 +0100 |
commit | 6d1dea337b8ae64ddfe4c1627014d09963388b0d (patch) | |
tree | c5cefd5b0334185780ffa8d391cb2d2f70c003af /synapse/push/__init__.py | |
parent | Changelog (diff) | |
parent | changelog (diff) | |
download | synapse-6d1dea337b8ae64ddfe4c1627014d09963388b0d.tar.xz |
Merge branch 'release-v0.9.1' of github.com:matrix-org/synapse v0.9.1
Diffstat (limited to 'synapse/push/__init__.py')
-rw-r--r-- | synapse/push/__init__.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/synapse/push/__init__.py b/synapse/push/__init__.py index e3dd4ce76d..8059fff1b2 100644 --- a/synapse/push/__init__.py +++ b/synapse/push/__init__.py @@ -74,15 +74,18 @@ class Pusher(object): rawrules = yield self.store.get_push_rules_for_user(self.user_name) - for r in rawrules: - r['conditions'] = json.loads(r['conditions']) - r['actions'] = json.loads(r['actions']) + rules = [] + for rawrule in rawrules: + rule = dict(rawrule) + rule['conditions'] = json.loads(rawrule['conditions']) + rule['actions'] = json.loads(rawrule['actions']) + rules.append(rule) enabled_map = yield self.store.get_push_rules_enabled_for_user(self.user_name) user = UserID.from_string(self.user_name) - rules = baserules.list_with_base_rules(rawrules, user) + rules = baserules.list_with_base_rules(rules, user) room_id = ev['room_id'] |