Clean up an indirect reference to the homeserver datastore (#11914)

pull/11930/head
Andrew Morgan 2022-02-07 13:25:09 +00:00 committed by GitHub
parent 0c4878caf2
commit e03dde259b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
changelog.d/11914.misc Normal file
View File

@ -0,0 +1 @@
Various refactors to the typing notifications code.

View File

@ -446,7 +446,7 @@ class TypingWriterHandler(FollowerTypingHandler):
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 @@ class TypingNotificationEventSource(EventSource[int, JsonDict]):
continue
if not await service.matches_user_in_member_list(
room_id, handler.store
room_id, self._main_store
):
continue