mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Merge pull request #166 from matrix-org/bugs/SYN-390
SYN-390: Don't modify the dictionary returned from the database here either
This commit is contained in:
commit
e7b25a649c
@ -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(rawrules)
|
||||
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']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user