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

Fix bad naming of storage function #9637

Merged
merged 3 commits into from
Mar 17, 2021
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/9637.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename storage function to fix spelling and not conflict with another functions name.
2 changes: 1 addition & 1 deletion synapse/handlers/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ async def get_user_ids_changed(

# Fetch the current state at the time.
try:
event_ids = await self.store.get_forward_extremeties_for_room(
event_ids = await self.store.get_forward_extremities_for_room_at_stream_ordering(
room_id, stream_ordering=stream_ordering
)
except errors.StoreError:
Expand Down
6 changes: 4 additions & 2 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1979,8 +1979,10 @@ async def get_rooms_for_user_at(

logger.info("User joined room after current token: %s", room_id)

extrems = await self.store.get_forward_extremeties_for_room(
room_id, event_pos.stream
extrems = (
await self.store.get_forward_extremities_for_room_at_stream_ordering(
room_id, event_pos.stream
)
)
users_in_room = await self.state.get_current_users_in_room(room_id, extrems)
if user_id in users_in_room:
Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/event_federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ def _get_min_depth_interaction(self, txn, room_id):

return int(min_depth) if min_depth is not None else None

async def get_forward_extremeties_for_room(
async def get_forward_extremities_for_room_at_stream_ordering(
self, room_id: str, stream_ordering: int
) -> List[str]:
"""For a given room_id and stream_ordering, return the forward
Expand Down