This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1+ Faster joins: make `computer_state_after_events` consistent with other state-fetching functions that take a `StateFilter`.
Original file line number Diff line number Diff line change @@ -202,14 +202,20 @@ async def compute_state_after_events(
202202 room_id: the room_id containing the given events.
203203 event_ids: the events whose state should be fetched and resolved.
204204 await_full_state: if `True`, will block if we do not yet have complete state
205- at the given `event_id`s, regardless of whether `state_filter` is
206- satisfied by partial state .
205+ at these events and `state_filter` is not satisfied by partial state.
206+ Defaults to `True` .
207207
208208 Returns:
209209 the state dict (a mapping from (event_type, state_key) -> event_id) which
210210 holds the resolution of the states after the given event IDs.
211211 """
212212 logger .debug ("calling resolve_state_groups from compute_state_after_events" )
213+ if (
214+ await_full_state
215+ and state_filter
216+ and not state_filter .must_await_full_state (self .hs .is_mine_id )
217+ ):
218+ await_full_state = False
213219 ret = await self .resolve_state_groups_for_events (
214220 room_id , event_ids , await_full_state
215221 )
You can’t perform that action at this time.
0 commit comments