diff options
author | Erik Johnston <erik@matrix.org> | 2016-06-03 11:44:32 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-06-03 11:44:32 +0100 |
commit | 722472b48c6b54b53be4649b68e50c2b9bccc39c (patch) | |
tree | 1fce6497d0eaa66811259c00137c9c36e7bb121e /synapse/handlers/sync.py | |
parent | Merge pull request #824 from matrix-org/markjh/slaved_presence_store (diff) | |
parent | Load push rules in storage layer, so that they get cached (diff) | |
download | synapse-722472b48c6b54b53be4649b68e50c2b9bccc39c.tar.xz |
Merge pull request #825 from matrix-org/erikj/cache_push_rules
Load push rules in storage layer so that they get cached
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r-- | synapse/handlers/sync.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index 5307b62b85..be26a491ff 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -198,9 +198,8 @@ class SyncHandler(object): @defer.inlineCallbacks def push_rules_for_user(self, user): user_id = user.to_string() - rawrules = yield self.store.get_push_rules_for_user(user_id) - enabled_map = yield self.store.get_push_rules_enabled_for_user(user_id) - rules = format_push_rules_for_user(user, rawrules, enabled_map) + rules = yield self.store.get_push_rules_for_user(user_id) + rules = format_push_rules_for_user(user, rules) defer.returnValue(rules) @defer.inlineCallbacks |