summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-03-22 13:59:56 +0000
committerMark Haines <mjark@negativecurvature.net>2016-03-22 13:59:56 +0000
commitcd9ba1ed8916809f2418161ed8b9c6e010d12d2a (patch)
treee64dbfd39f53d88e1ee9fca570172be016822c85
parentMerge pull request #660 from matrix-org/erikj/state_cache (diff)
parentUse get_users_in_room to count the number of room members rather than using r... (diff)
downloadsynapse-cd9ba1ed8916809f2418161ed8b9c6e010d12d2a.tar.xz
Merge pull request #661 from matrix-org/markjh/member_count
Fix membership count for BulkPushRuleEvaluator
-rw-r--r--synapse/push/bulk_push_rule_evaluator.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/push/bulk_push_rule_evaluator.py b/synapse/push/bulk_push_rule_evaluator.py
index 87d5061fb0..76d7eb7ce0 100644
--- a/synapse/push/bulk_push_rule_evaluator.py
+++ b/synapse/push/bulk_push_rule_evaluator.py
@@ -107,7 +107,9 @@ class BulkPushRuleEvaluator:
             users_dict.items(), [event], {event.event_id: current_state}
         )
 
-        evaluator = PushRuleEvaluatorForEvent(event, len(self.users_in_room))
+        room_members = yield self.store.get_users_in_room(self.room_id)
+
+        evaluator = PushRuleEvaluatorForEvent(event, len(room_members))
 
         condition_cache = {}