This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Commit 4f4d690 David Robertson
authored
1 parent fb60cb1 commit 4f4d690 Copy full SHA for 4f4d690
File tree 2 files changed +9
-2
lines changed
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(
202
202
room_id: the room_id containing the given events.
203
203
event_ids: the events whose state should be fetched and resolved.
204
204
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` .
207
207
208
208
Returns:
209
209
the state dict (a mapping from (event_type, state_key) -> event_id) which
210
210
holds the resolution of the states after the given event IDs.
211
211
"""
212
212
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
213
219
ret = await self .resolve_state_groups_for_events (
214
220
room_id , event_ids , await_full_state
215
221
)
You can’t perform that action at this time.
0 commit comments