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

Rename to more clear get_insertion_event_id_by_batch_id (MSC2716) #11244

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/11244.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) historical messages backfilling in random order on remote homeservers.
2 changes: 1 addition & 1 deletion synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,7 @@ async def persist_and_notify_client_event(
conflicting_insertion_event_id = None
if next_batch_id:
conflicting_insertion_event_id = (
await self.store.get_insertion_event_by_batch_id(
await self.store.get_insertion_event_id_by_batch_id(
event.room_id, next_batch_id
)
)
Expand Down
2 changes: 1 addition & 1 deletion synapse/rest/client/room_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async def on_POST(
# and have the batch connected.
if batch_id_from_query:
corresponding_insertion_event_id = (
await self.store.get_insertion_event_by_batch_id(
await self.store.get_insertion_event_id_by_batch_id(
room_id, batch_id_from_query
)
)
Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/room_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


class RoomBatchStore(SQLBaseStore):
async def get_insertion_event_by_batch_id(
async def get_insertion_event_id_by_batch_id(
self, room_id: str, batch_id: str
) -> Optional[str]:
"""Retrieve a insertion event ID.
Expand Down