summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-05-20 23:33:13 +0100
committerRichard van der Hoff <richard@matrix.org>2020-05-20 23:33:13 +0100
commit1c347c84bf2287b364932c62e75b853e7af996e3 (patch)
treeda9f101b74f4b837b6a4c5d0eba1ecab31f94150 /synapse/handlers/message.py
parentFix field name in stubbed out presence servlet (diff)
downloadsynapse-1c347c84bf2287b364932c62e75b853e7af996e3.tar.xz
inline some config references
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py8
1 files changed, 5 insertions, 3 deletions
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