Review comments

This commit is contained in:
Kegan Dougal
2026-03-10 15:07:58 +00:00
parent ecc98608bc
commit a0711ef7ff
4 changed files with 9 additions and 6 deletions
+3 -1
View File
@@ -195,7 +195,9 @@ async def check_state_independent_auth_rules(
for event_id in prev_state_events_ids
if not batched_auth_events or event_id not in batched_auth_events
}
# Try to load the `prev _state_events` from `batched_auth_events` initially
# We need to do some checks on the events provided as prev_state_events, so we need to load them.
# Try to load the `prev_state_events` from `batched_auth_events` initially as that can save us
# a database hit.
prev_state_events = (
{}
if not batched_auth_events
+1
View File
@@ -198,6 +198,7 @@ class EventBuilder:
if auth_event_ids is None:
# Every non-create event must have a room ID
assert self.room_id is not None
assert not self.room_version.msc4242_state_dags
state_ids = await self._state.compute_state_after_events(
self.room_id,
prev_event_ids,
+4 -4
View File
@@ -642,7 +642,7 @@ class EventCreationHandler:
prev_state_events:
The state event IDs which represent the current forward extremities of the state DAG.
Only applicable on room versions which use a state DAG.
Only applicable on room versions which use a state DAG (MSC4242).
Raises:
ResourceLimitError if server is blocked to some resource being
@@ -1003,7 +1003,7 @@ class EventCreationHandler:
based on the prev_events.
prev_state_events:
The state event IDs which represent the current forward extremities of the state DAG.
Only applicable on room versions which use a state DAG.
Only applicable on room versions which use a state DAG (MSC4242).
Returns:
The event, and its stream ordering (if deduplication happened,
the previous, duplicate event).
@@ -1281,8 +1281,8 @@ class EventCreationHandler:
prev_state_events:
The state event IDs which represent the current forward extremities of the state DAG.
Only applicable on room versions which use a state DAG. If unset, populates them
from the current state dag forward extremities.
Only applicable on room versions which use a state DAG (MSC4242).
If unset, populates them from the current state dag forward extremities.
Returns:
Tuple of created event, UnpersistedEventContext
@@ -1034,7 +1034,7 @@ class EventsPersistenceStorageController:
**{SERVER_NAME_LABEL: self.server_name}
).observe(len(result))
# There should always be at least one forward extremity.
# There should always be at least one forward extremity.
assert result, f"No state dag forward extremities left in room {room_id}!"
return result