diff options
author | David Baker <dave@matrix.org> | 2016-04-07 17:37:19 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2016-04-07 17:37:19 +0100 |
commit | a4a31fa8dca0199e8958b71a39b749eb4f6efb9e (patch) | |
tree | f40a12923f2139c05e10552a8209a7e735a6fd3d /synapse/push/httppusher.py | |
parent | Oops, inequality fail (diff) | |
download | synapse-a4a31fa8dca0199e8958b71a39b749eb4f6efb9e.tar.xz |
Only pass in what we need
Diffstat (limited to 'synapse/push/httppusher.py')
-rw-r--r-- | synapse/push/httppusher.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py index a0d0234e2e..9f51106d0f 100644 --- a/synapse/push/httppusher.py +++ b/synapse/push/httppusher.py @@ -96,7 +96,9 @@ class HttpPusher(object): # We could check the receipts are actually m.read receipts here, # but currently that's the only type of receipt anyway... with Measure(self.clock, "push.on_new_receipts"): - badge = yield push_tools.get_badge_count(self.hs, self.user_id) + badge = yield push_tools.get_badge_count( + self.hs.get_datastore(), self.user_id + ) yield self.send_badge(badge) @defer.inlineCallbacks @@ -185,7 +187,7 @@ class HttpPusher(object): defer.returnValue(True) tweaks = push_rule_evaluator.tweaks_for_actions(push_action['actions']) - badge = yield push_tools.get_badge_count(self.hs, self.user_id) + badge = yield push_tools.get_badge_count(self.hs.get_datastore(), self.user_id) event = yield self.store.get_event(push_action['event_id'], allow_none=True) if event is None: @@ -215,7 +217,7 @@ class HttpPusher(object): @defer.inlineCallbacks def _build_notification_dict(self, event, tweaks, badge): - ctx = yield push_tools.get_context_for_event(self.hs, event) + ctx = yield push_tools.get_context_for_event(self.hs.get_datastore(), event) d = { 'notification': { |