mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
Remove HomeServer.get_datastore()
(#12031)
The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
This commit is contained in:
parent
c1ac2a8135
commit
e24ff8ebe3
230 changed files with 526 additions and 500 deletions
|
@ -172,7 +172,9 @@ class ModuleApi:
|
|||
|
||||
# TODO: Fix this type hint once the types for the data stores have been ironed
|
||||
# out.
|
||||
self._store: Union[DataStore, "GenericWorkerSlavedStore"] = hs.get_datastore()
|
||||
self._store: Union[
|
||||
DataStore, "GenericWorkerSlavedStore"
|
||||
] = hs.get_datastores().main
|
||||
self._auth = hs.get_auth()
|
||||
self._auth_handler = auth_handler
|
||||
self._server_name = hs.hostname
|
||||
|
@ -926,7 +928,7 @@ class ModuleApi:
|
|||
)
|
||||
|
||||
# Try to retrieve the resulting event.
|
||||
event = await self._hs.get_datastore().get_event(event_id)
|
||||
event = await self._hs.get_datastores().main.get_event(event_id)
|
||||
|
||||
# update_membership is supposed to always return after the event has been
|
||||
# successfully persisted.
|
||||
|
@ -1270,7 +1272,7 @@ class PublicRoomListManager:
|
|||
"""
|
||||
|
||||
def __init__(self, hs: "HomeServer"):
|
||||
self._store = hs.get_datastore()
|
||||
self._store = hs.get_datastores().main
|
||||
|
||||
async def room_is_in_public_room_list(self, room_id: str) -> bool:
|
||||
"""Checks whether a room is in the public room list.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue