mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-07 23:55:05 -04:00
Add back the guard against the user directory stream position not existing. (#9428)
As the comment says, this guard was there for when the initial user directory update has yet to happen.
This commit is contained in:
parent
626afd7e89
commit
43f1c82457
3 changed files with 12 additions and 1 deletions
|
@ -707,7 +707,13 @@ class UserDirectoryStore(UserDirectoryBackgroundUpdateStore):
|
|||
|
||||
return {row["room_id"] for row in rows}
|
||||
|
||||
async def get_user_directory_stream_pos(self) -> int:
|
||||
async def get_user_directory_stream_pos(self) -> Optional[int]:
|
||||
"""
|
||||
Get the stream ID of the user directory stream.
|
||||
|
||||
Returns:
|
||||
The stream token or None if the initial background update hasn't happened yet.
|
||||
"""
|
||||
return await self.db_pool.simple_select_one_onecol(
|
||||
table="user_directory_stream_pos",
|
||||
keyvalues={},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue