diff options
author | Nick Barrett <nick@beeper.com> | 2021-11-03 14:25:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-03 14:25:47 +0000 |
commit | af54167516c7211937efa5b800853f3088ef5178 (patch) | |
tree | 6b6cc1144f713b35f42ad776c4bb265948a5d2c1 /synapse/handlers | |
parent | Remove a debug statement from tests. (#11239) (diff) | |
download | synapse-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/handlers')
-rw-r--r-- | synapse/handlers/typing.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py index c411d69924..22c6174821 100644 --- a/synapse/handlers/typing.py +++ b/synapse/handlers/typing.py @@ -62,8 +62,8 @@ class FollowerTypingHandler: if hs.should_send_federation(): self.federation = hs.get_federation_sender() - if hs.config.worker.writers.typing != hs.get_instance_name(): - hs.get_federation_registry().register_instance_for_edu( + if hs.get_instance_name() not in hs.config.worker.writers.typing: + hs.get_federation_registry().register_instances_for_edu( "m.typing", hs.config.worker.writers.typing, ) @@ -205,7 +205,7 @@ class TypingWriterHandler(FollowerTypingHandler): def __init__(self, hs: "HomeServer"): super().__init__(hs) - assert hs.config.worker.writers.typing == hs.get_instance_name() + assert hs.get_instance_name() in hs.config.worker.writers.typing self.auth = hs.get_auth() self.notifier = hs.get_notifier() |