Update docstring to clarify that get_partial_state_events_batch does not just give you completely arbitrary partial-state events. (#14417)

This commit is contained in:
reivilibre 2022-11-15 10:43:17 +00:00 committed by GitHub
parent 64dd8a9c6e
commit 634359b083
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

1
changelog.d/14417.misc Normal file
View file

@ -0,0 +1 @@
Update docstring to clarify that `get_partial_state_events_batch` does not just give you completely arbitrary partial-state events.

View file

@ -2228,7 +2228,15 @@ class EventsWorkerStore(SQLBaseStore):
return result is not None
async def get_partial_state_events_batch(self, room_id: str) -> List[str]:
"""Get a list of events in the given room that have partial state"""
"""
Get a list of events in the given room that:
- have partial state; and
- are ready to be resynced (because they have no prev_events that are
partial-stated)
See the docstring on `_get_partial_state_events_batch_txn` for more
information.
"""
return await self.db_pool.runInteraction(
"get_partial_state_events_batch",
self._get_partial_state_events_batch_txn,