summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-05-11 07:15:21 -0400
committerGitHub <noreply@github.com>2022-05-11 07:15:21 -0400
commita4c75918b3e9cf48fa2bb91e9861f5f6fd74bd2e (patch)
tree6e1acec089254021c027e481b5741f4e36576a7a /synapse/handlers/message.py
parentFix `/messages` throwing a 500 when querying for non-existent room (#12683) (diff)
downloadsynapse-a4c75918b3e9cf48fa2bb91e9861f5f6fd74bd2e.tar.xz
Remove unneeded `ActionGenerator` class. (#12691)
It simply passes through to `BulkPushRuleEvaluator`, which can be
called directly instead.
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index e47799e7f9..4a4b535bae 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -426,7 +426,7 @@ class EventCreationHandler:
         # This is to stop us from diverging history *too* much.
         self.limiter = Linearizer(max_count=5, name="room_event_creation_limit")
 
-        self.action_generator = hs.get_action_generator()
+        self._bulk_push_rule_evaluator = hs.get_bulk_push_rule_evaluator()
 
         self.spam_checker = hs.get_spam_checker()
         self.third_party_event_rules: "ThirdPartyEventRules" = (
@@ -1249,7 +1249,9 @@ class EventCreationHandler:
         # and `state_groups` because they have `prev_events` that aren't persisted yet
         # (historical messages persisted in reverse-chronological order).
         if not event.internal_metadata.is_historical():
-            await self.action_generator.handle_push_actions_for_event(event, context)
+            await self._bulk_push_rule_evaluator.action_for_event_by_user(
+                event, context
+            )
 
         try:
             # If we're a worker we need to hit out to the master.