summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-03-22 13:52:45 +0000
committerMark Haines <mark.haines@matrix.org>2016-03-22 13:52:45 +0000
commit5defb25ac622d979c13d9e9d311e69c2ef7c15a5 (patch)
tree0c8aa4f6865876852d7323ee75ab22e94e64f17d
parentMerge pull request #655 from matrix-org/erikj/edu_yield (diff)
downloadsynapse-5defb25ac622d979c13d9e9d311e69c2ef7c15a5.tar.xz
Use get_users_in_room to count the number of room members rather than using read_receipts
-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 = {}