Update docs to not lie

This commit is contained in:
Kegan Dougal
2025-09-24 12:45:22 +01:00
parent 771692addd
commit ad6a2b9e0c
2 changed files with 5 additions and 14 deletions
+2 -2
View File
@@ -379,8 +379,8 @@ class PersistEventsStore:
# re-evaluation, so it can't do that without leaking out the txn currently, hence it
# now just lives outside.
if self.msc4354_sticky_events:
# process events which are sticky as well as re-evaluate soft-failed sticky events.
await self.store.handle_sticky_events(
# re-evaluate soft-failed sticky events.
await self.store.reevaluate_soft_failed_sticky_events(
room_id,
events_and_contexts,
state_delta_for_room,
@@ -209,26 +209,17 @@ class StickyEventsWorkerStore(StateGroupWorkerStore, CacheInvalidationWorkerStor
)
return cast(List[Tuple[int, str, str]], txn.fetchall())
async def handle_sticky_events(
async def reevaluate_soft_failed_sticky_events(
self,
room_id: str,
events_and_contexts: List[EventPersistencePair],
state_delta_for_room: Optional[DeltaState],
) -> None:
"""Update the sticky events table, used in MSC4354. Intended to be called after the persist
events transaction.
This function assumes that `_store_event_txn()` (to persist the event) and
`_update_current_state_txn(...)` (so the current state has taken the events into account)
have already been run.
"Handling" sticky events is broken into two phases:
- for each sticky event in events_and_contexts, mark them as sticky in the sticky events table.
- for each still-sticky soft-failed event in the room, re-evaluate soft-failedness.
"""Re-evaluate soft failed events in the room provided.
Args:
room_id: The room that all of the events belong to
events_and_contexts: The events being persisted.
events_and_contexts: The events just persisted. These are not eligible for re-evaluation.
state_delta_for_room: The changes to the current state, used to detect if we need to
re-evaluate soft-failed sticky events.
"""