Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 0c08e70

Browse files
author
Mathieu Velten
committed
Do not wait for full state when creating events to send
1 parent d85cba1 commit 0c08e70

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

synapse/events/builder.py

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ async def build(
128128
state_filter=StateFilter.from_types(
129129
auth_types_for_event(self.room_version, self)
130130
),
131+
await_full_state=False,
131132
)
132133
auth_event_ids = self._event_auth_handler.compute_auth_events(
133134
self, state_ids

synapse/state/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -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
@@ -206,7 +207,7 @@ async def compute_state_after_events(
206207
holds the resolution of the states after the given event IDs.
207208
"""
208209
logger.debug("calling resolve_state_groups from compute_state_after_events")
209-
ret = await self.resolve_state_groups_for_events(room_id, event_ids)
210+
ret = await self.resolve_state_groups_for_events(room_id, event_ids, await_full_state)
210211
return await ret.get_state(self._state_storage_controller, state_filter)
211212

212213
async def get_current_user_ids_in_room(

0 commit comments

Comments
 (0)