From 1c347c84bf2287b364932c62e75b853e7af996e3 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 20 May 2020 23:33:13 +0100 Subject: inline some config references --- synapse/handlers/message.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'synapse/handlers') diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index a622a600b4..66b46bd59f 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -403,8 +403,10 @@ class EventCreationHandler(object): if self._block_events_without_consent_error: self._consent_uri_builder = ConsentURIBuilder(self.config) + self._is_worker_app = self.config.worker_app is not None + if ( - not self.config.worker_app + not self._is_worker_app and self.config.cleanup_extremities_with_dummy_events ): self.clock.looping_call( @@ -824,7 +826,7 @@ class EventCreationHandler(object): success = False try: # If we're a worker we need to hit out to the master. - if self.config.worker_app: + if self._is_worker_app: await self.send_event_to_master( event_id=event.event_id, store=self.store, @@ -890,7 +892,7 @@ class EventCreationHandler(object): This should only be run on master. """ - assert not self.config.worker_app + assert not self._is_worker_app if ratelimit: # We check if this is a room admin redacting an event so that we -- cgit 1.5.1