From 8749911879d69f70904fbe35f165fbb083bfb97c Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 29 Nov 2021 17:35:04 +0000 Subject: [PATCH 1/2] Clean up indirect reference to the homeserver datastore --- synapse/handlers/typing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py index e43c22832da6..e4bed1c93758 100644 --- a/synapse/handlers/typing.py +++ b/synapse/handlers/typing.py @@ -446,7 +446,7 @@ def process_replication_rows( class TypingNotificationEventSource(EventSource[int, JsonDict]): def __init__(self, hs: "HomeServer"): - self.hs = hs + self._main_store = hs.get_datastore() self.clock = hs.get_clock() # We can't call get_typing_handler here because there's a cycle: # @@ -487,7 +487,7 @@ async def get_new_events_as( continue if not await service.matches_user_in_member_list( - room_id, handler.store + room_id, self._main_store ): continue From 779611ceb953379e1731a9aa455b445c9cd1ff09 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 4 Feb 2022 17:41:40 +0000 Subject: [PATCH 2/2] changelog --- changelog.d/11914.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/11914.misc diff --git a/changelog.d/11914.misc b/changelog.d/11914.misc new file mode 100644 index 000000000000..c288d43455f8 --- /dev/null +++ b/changelog.d/11914.misc @@ -0,0 +1 @@ +Various refactors to the typing notifications code. \ No newline at end of file