diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2023-05-04 15:18:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 14:18:22 +0000 |
commit | 2e59e97ebd02e93da39e6c90335d3b24ed01217a (patch) | |
tree | 078d22f7f4d6f03bafe7febf0c7bc3a81a953506 /synapse/handlers/message.py | |
parent | Update the base rules to remove the dont_notify action. (MSC3987) (#15534) (diff) | |
download | synapse-2e59e97ebd02e93da39e6c90335d3b24ed01217a.tar.xz |
Move ThirdPartyEventRules into module_api/callbacks (#15535)
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r-- | synapse/handlers/message.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index ac1932a7f9..0b61c2272b 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -77,7 +77,6 @@ from synapse.util.metrics import measure_func from synapse.visibility import get_effective_room_visibility_from_state if TYPE_CHECKING: - from synapse.events.third_party_rules import ThirdPartyEventRules from synapse.server import HomeServer logger = logging.getLogger(__name__) @@ -509,8 +508,8 @@ class EventCreationHandler: self._bulk_push_rule_evaluator = hs.get_bulk_push_rule_evaluator() self._spam_checker_module_callbacks = hs.get_module_api_callbacks().spam_checker - self.third_party_event_rules: "ThirdPartyEventRules" = ( - self.hs.get_third_party_event_rules() + self._third_party_event_rules = ( + self.hs.get_module_api_callbacks().third_party_event_rules ) self._block_events_without_consent_error = ( @@ -1314,7 +1313,7 @@ class EventCreationHandler: if requester: context.app_service = requester.app_service - res, new_content = await self.third_party_event_rules.check_event_allowed( + res, new_content = await self._third_party_event_rules.check_event_allowed( event, context ) if res is False: |