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

Fix mypy error on develop #8282

Merged
merged 3 commits into from
Sep 8, 2020
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/8282.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clean up type hints for `PaginationConfig`.
9 changes: 6 additions & 3 deletions synapse/handlers/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,15 @@ async def get_messages(
# case "JOIN" would have been returned.
assert member_event_id

leave_token = await self.store.get_topological_token_for_event(
leave_token_str = await self.store.get_topological_token_for_event(
member_event_id
)
if RoomStreamToken.parse(leave_token).topological < max_topo:
leave_token = RoomStreamToken.parse(leave_token_str)
assert leave_token.topological is not None

if leave_token.topological < max_topo:
from_token = from_token.copy_and_replace(
"room_key", leave_token
"room_key", leave_token_str
)

await self.hs.get_handlers().federation_handler.maybe_backfill(
Expand Down