diff options
author | David Baker <dave@matrix.org> | 2016-01-04 13:39:29 +0000 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2016-01-04 13:39:29 +0000 |
commit | 3051c9d002a467643d1ab32bc36974d2e3f84c12 (patch) | |
tree | 0d660fd86194ded09dcb416f40c0dea40f0dcd2e /synapse/push | |
parent | Fix merge fail with anon access stuff (diff) | |
download | synapse-3051c9d002a467643d1ab32bc36974d2e3f84c12.tar.xz |
Address minor PR issues
Diffstat (limited to 'synapse/push')
-rw-r--r-- | synapse/push/action_generator.py | 7 | ||||
-rw-r--r-- | synapse/push/bulk_push_rule_evaluator.py | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/synapse/push/action_generator.py b/synapse/push/action_generator.py index 00f518f609..4ab5d9e1b8 100644 --- a/synapse/push/action_generator.py +++ b/synapse/push/action_generator.py @@ -23,8 +23,7 @@ logger = logging.getLogger(__name__) class ActionGenerator: - def __init__(self, hs, store): - self.hs = hs + def __init__(self, store): self.store = store # really we want to get all user ids and all profile tags too, # since we want the actions for each profile tag for every user and @@ -34,9 +33,9 @@ class ActionGenerator: # tag (ie. we just need all the users). @defer.inlineCallbacks - def handle_event(self, event): + def handle_push_actions_for_event(self, event): bulk_evaluator = yield bulk_push_rule_evaluator.evaluator_for_room_id( - event['room_id'], self.hs, self.store + event['room_id'], self.store ) actions_by_user = bulk_evaluator.action_for_event_by_user(event) diff --git a/synapse/push/bulk_push_rule_evaluator.py b/synapse/push/bulk_push_rule_evaluator.py index c489bfc8d4..1c4e54ba44 100644 --- a/synapse/push/bulk_push_rule_evaluator.py +++ b/synapse/push/bulk_push_rule_evaluator.py @@ -33,7 +33,7 @@ def decode_rule_json(rule): @defer.inlineCallbacks -def evaluator_for_room_id(room_id, hs, store): +def evaluator_for_room_id(room_id, store): users = yield store.get_users_in_room(room_id) rules_by_user = yield store.bulk_get_push_rules(users) rules_by_user = { |