summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorNick Barrett <nick@beeper.com>2021-11-03 14:25:47 +0000
committerGitHub <noreply@github.com>2021-11-03 14:25:47 +0000
commitaf54167516c7211937efa5b800853f3088ef5178 (patch)
tree6b6cc1144f713b35f42ad776c4bb265948a5d2c1 /synapse/server.py
parentRemove a debug statement from tests. (#11239) (diff)
downloadsynapse-af54167516c7211937efa5b800853f3088ef5178.tar.xz
Enable passing typing stream writers as a list. (#11237)
This makes the typing stream writer config match the other stream writers
that only currently support a single worker.
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 0fbf36ba99..013a7bacaa 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -463,7 +463,7 @@ class HomeServer(metaclass=abc.ABCMeta):
 
     @cache_in_self
     def get_typing_writer_handler(self) -> TypingWriterHandler:
-        if self.config.worker.writers.typing == self.get_instance_name():
+        if self.get_instance_name() in self.config.worker.writers.typing:
             return TypingWriterHandler(self)
         else:
             raise Exception("Workers cannot write typing")
@@ -474,7 +474,7 @@ class HomeServer(metaclass=abc.ABCMeta):
 
     @cache_in_self
     def get_typing_handler(self) -> FollowerTypingHandler:
-        if self.config.worker.writers.typing == self.get_instance_name():
+        if self.get_instance_name() in self.config.worker.writers.typing:
             # Use get_typing_writer_handler to ensure that we use the same
             # cached version.
             return self.get_typing_writer_handler()