Rename MSC2716 things from chunk to batch to match /batch_send endpoint (#10838)

See https://github.com/matrix-org/matrix-doc/pull/2716#discussion_r684574497

Dropping support for older MSC2716 room versions so we don't have to worry about
supporting both chunk and batch events.
This commit is contained in:
Eric Eastwood 2021-09-21 15:06:28 -05:00 committed by GitHub
parent 4054dfa409
commit 51e2db3598
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 162 additions and 117 deletions

View file

@ -18,11 +18,11 @@ from synapse.storage._base import SQLBaseStore
class RoomBatchStore(SQLBaseStore):
async def get_insertion_event_by_chunk_id(self, chunk_id: str) -> Optional[str]:
async def get_insertion_event_by_batch_id(self, batch_id: str) -> Optional[str]:
"""Retrieve a insertion event ID.
Args:
chunk_id: The chunk ID of the insertion event to retrieve.
batch_id: The batch ID of the insertion event to retrieve.
Returns:
The event_id of an insertion event, or None if there is no known
@ -30,7 +30,7 @@ class RoomBatchStore(SQLBaseStore):
"""
return await self.db_pool.simple_select_one_onecol(
table="insertion_events",
keyvalues={"next_chunk_id": chunk_id},
keyvalues={"next_batch_id": batch_id},
retcol="event_id",
allow_none=True,
)