summary refs log tree commit diff
path: root/synapse/handlers/sync.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-06-01 14:27:07 +0100
committerErik Johnston <erik@matrix.org>2016-06-03 11:10:00 +0100
commit6a0afa582aa5bf816e082af31ac44e2a8fee28c0 (patch)
tree00192465798c40d59ddae7862580b78e6918b81d /synapse/handlers/sync.py
parentRemove unnecessary sets (diff)
downloadsynapse-6a0afa582aa5bf816e082af31ac44e2a8fee28c0.tar.xz
Load push rules in storage layer, so that they get cached
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r--synapse/handlers/sync.py5
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