@@ -190,6 +190,7 @@ async def compute_state_after_events(
190190 room_id : str ,
191191 event_ids : Collection [str ],
192192 state_filter : Optional [StateFilter ] = None ,
193+ await_full_state : bool = True ,
193194 ) -> StateMap [str ]:
194195 """Fetch the state after each of the given event IDs. Resolve them and return.
195196
@@ -200,13 +201,18 @@ async def compute_state_after_events(
200201 Args:
201202 room_id: the room_id containing the given events.
202203 event_ids: the events whose state should be fetched and resolved.
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.
203207
204208 Returns:
205209 the state dict (a mapping from (event_type, state_key) -> event_id) which
206210 holds the resolution of the states after the given event IDs.
207211 """
208212 logger .debug ("calling resolve_state_groups from compute_state_after_events" )
209- ret = await self .resolve_state_groups_for_events (room_id , event_ids )
213+ ret = await self .resolve_state_groups_for_events (
214+ room_id , event_ids , await_full_state
215+ )
210216 return await ret .get_state (self ._state_storage_controller , state_filter )
211217
212218 async def get_current_user_ids_in_room (
0 commit comments