Load push rules in storage layer, so that they get cached

This commit is contained in:
Erik Johnston 2016-06-01 14:27:07 +01:00
parent 59f2d73522
commit 6a0afa582a
5 changed files with 63 additions and 44 deletions

View file

@ -128,11 +128,9 @@ class PushRuleRestServlet(ClientV1RestServlet):
# we build up the full structure and then decide which bits of it
# to send which means doing unnecessary work sometimes but is
# is probably not going to make a whole lot of difference
rawrules = yield self.store.get_push_rules_for_user(user_id)
rules = 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(requester.user, rawrules, enabled_map)
rules = format_push_rules_for_user(requester.user, rules)
path = request.postpath[1:]