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:40:22 +0100
committerRichard van der Hoff <richard@matrix.org>2020-05-20 23:40:22 +0100
commit89f795fe8a7f692d1088219cb6640137169f7a1c (patch)
treefa8e3a3f1863cf5b50b6e81c1e301cde24976a9b /synapse/handlers/message.py
parentMerge branch 'rav/matrix_hacks' into matrix-org-hotfixes (diff)
parentinline some config references (diff)
downloadsynapse-89f795fe8a7f692d1088219cb6640137169f7a1c.tar.xz
Merge branch 'rav/matrix_hacks' into matrix-org-hotfixes
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 4a044f8df1..71c3a420ab 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