diff options
author | Erik Johnston <erik@matrix.org> | 2022-06-01 16:02:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-01 16:02:53 +0100 |
commit | 888a29f4127723a8d048ce47cff37ee8a7a6f1b9 (patch) | |
tree | 891ae4c95632801bb097aaed8aea5d8b541c5cf7 /synapse/handlers/presence.py | |
parent | Fix complement tests using the wrong path (#12933) (diff) | |
download | synapse-888a29f4127723a8d048ce47cff37ee8a7a6f1b9.tar.xz |
Wait for lazy join to complete when getting current state (#12872)
Diffstat (limited to 'synapse/handlers/presence.py')
-rw-r--r-- | synapse/handlers/presence.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index bf112b9e1e..895ea63ed3 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -134,6 +134,7 @@ class BasePresenceHandler(abc.ABC): def __init__(self, hs: "HomeServer"): self.clock = hs.get_clock() self.store = hs.get_datastores().main + self._storage_controllers = hs.get_storage_controllers() self.presence_router = hs.get_presence_router() self.state = hs.get_state_handler() self.is_mine_id = hs.is_mine_id @@ -1348,7 +1349,10 @@ class PresenceHandler(BasePresenceHandler): self._event_pos, room_max_stream_ordering, ) - max_pos, deltas = await self.store.get_current_state_deltas( + ( + max_pos, + deltas, + ) = await self._storage_controllers.state.get_current_state_deltas( self._event_pos, room_max_stream_ordering ) |