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

Commit

Permalink
Rename to more clear get_insertion_event_id_by_batch_id (MSC2716) (#…
Browse files Browse the repository at this point in the history
…11244)

`get_insertion_event_by_batch_id` -> `get_insertion_event_id_by_batch_id`

Split out from #11114
  • Loading branch information
MadLittleMods authored Nov 9, 2021
1 parent 4ee71b9 commit 84f235a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
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

0 comments on commit 84f235a

Please sign in to comment.