diff options
author | Erik Johnston <erik@matrix.org> | 2020-09-08 17:43:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 17:43:31 +0100 |
commit | 1553adc83122ac245f523524ae1583cd556ed121 (patch) | |
tree | 6cd1b663dd063c3f79b179927fe90282595e08a1 | |
parent | Include method in thumbnail media name (#7124) (diff) | |
download | synapse-1553adc83122ac245f523524ae1583cd556ed121.tar.xz |
Fix mypy error on develop (#8282)
-rw-r--r-- | changelog.d/8282.misc | 1 | ||||
-rw-r--r-- | synapse/handlers/pagination.py | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/changelog.d/8282.misc b/changelog.d/8282.misc new file mode 100644 index 0000000000..b6896a9300 --- /dev/null +++ b/changelog.d/8282.misc @@ -0,0 +1 @@ +Clean up type hints for `PaginationConfig`. diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py index 195a1fd77e..ec17d3d888 100644 --- a/synapse/handlers/pagination.py +++ b/synapse/handlers/pagination.py @@ -373,12 +373,15 @@ class PaginationHandler: # 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( |