mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-10 02:06:17 -05:00
Remove unneeded ActionGenerator class. (#12691)
It simply passes through to `BulkPushRuleEvaluator`, which can be called directly instead.
This commit is contained in:
parent
84facf769e
commit
a4c75918b3
7 changed files with 17 additions and 60 deletions
|
|
@ -103,7 +103,7 @@ class FederationEventHandler:
|
|||
self._event_creation_handler = hs.get_event_creation_handler()
|
||||
self._event_auth_handler = hs.get_event_auth_handler()
|
||||
self._message_handler = hs.get_message_handler()
|
||||
self._action_generator = hs.get_action_generator()
|
||||
self._bulk_push_rule_evaluator = hs.get_bulk_push_rule_evaluator()
|
||||
self._state_resolution_handler = hs.get_state_resolution_handler()
|
||||
# avoid a circular dependency by deferring execution here
|
||||
self._get_room_member_handler = hs.get_room_member_handler
|
||||
|
|
@ -1913,7 +1913,7 @@ class FederationEventHandler:
|
|||
min_depth,
|
||||
)
|
||||
else:
|
||||
await self._action_generator.handle_push_actions_for_event(
|
||||
await self._bulk_push_rule_evaluator.action_for_event_by_user(
|
||||
event, context
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue