From 75cc89cd29beb5ecd95e8b25c074fc89f8cf87dc Mon Sep 17 00:00:00 2001 From: Mathieu Velten Date: Fri, 16 Sep 2022 16:26:51 +0200 Subject: [PATCH] typing: use is_host_joined which doesn't wait the room full state Signed-off-by: Mathieu Velten --- changelog.d/13830.bugfix | 1 + synapse/handlers/typing.py | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) create mode 100644 changelog.d/13830.bugfix diff --git a/changelog.d/13830.bugfix b/changelog.d/13830.bugfix new file mode 100644 index 000000000000..ca998253422e --- /dev/null +++ b/changelog.d/13830.bugfix @@ -0,0 +1 @@ +Faster room joins: fix typing EDU being stuck because the handler was waiting for the full state, while this is not necessary. diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py index a4cd8b8f0cee..8f214368bf2b 100644 --- a/synapse/handlers/typing.py +++ b/synapse/handlers/typing.py @@ -362,11 +362,7 @@ async def _recv_edu(self, origin: str, content: JsonDict) -> None: ) return - domains = await self._storage_controllers.state.get_current_hosts_in_room( - room_id - ) - - if self.server_name in domains: + if await self.store.is_host_joined(room_id, self.server_name): logger.info("Got typing update from %s: %r", user_id, content) now = self.clock.time_msec() self._member_typing_until[member] = now + FEDERATION_TIMEOUT