diff options
author | David Baker <dave@matrix.org> | 2015-12-21 15:28:54 +0000 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-12-21 15:28:54 +0000 |
commit | f73f154ec2c8ffdc49270d3ccaf3053f915800f3 (patch) | |
tree | 2f428c3e2b2a3980d70c0b8f923b998ecc0a6239 /synapse/push/action_generator.py | |
parent | pep8 (diff) | |
download | synapse-f73f154ec2c8ffdc49270d3ccaf3053f915800f3.tar.xz |
Only run pushers for users on this hs!
Diffstat (limited to 'synapse/push/action_generator.py')
-rw-r--r-- | synapse/push/action_generator.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/push/action_generator.py b/synapse/push/action_generator.py index 1c7cd31666..6e107ca792 100644 --- a/synapse/push/action_generator.py +++ b/synapse/push/action_generator.py @@ -15,6 +15,8 @@ from twisted.internet import defer +from synapse.types import UserID + import push_rule_evaluator import logging @@ -23,7 +25,8 @@ logger = logging.getLogger(__name__) class ActionGenerator: - def __init__(self, store): + def __init__(self, hs, store): + self.hs = hs 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 @@ -37,6 +40,9 @@ class ActionGenerator: users = yield self.store.get_users_in_room(event['room_id']) for uid in users: + if not self.hs.is_mine(UserID.from_string(uid)): + continue + evaluator = yield push_rule_evaluator.\ evaluator_for_user_name_and_profile_tag( uid, None, event['room_id'], self.store |