Clean up types for PaginationConfig (#8250)

This removes `SourcePaginationConfig` and `get_pagination_rows`. The reasoning behind this is that these generic classes/functions erased the types of the IDs it used (i.e. instead of passing around `StreamToken` it'd pass in e.g. `token.room_key`, which don't have uniform types).
This commit is contained in:
Erik Johnston 2020-09-08 15:00:17 +01:00 committed by GitHub
parent 703e2b8a96
commit 0f545e6b96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 52 additions and 86 deletions

View file

@ -432,8 +432,9 @@ class Notifier:
If explicit_room_id is set, that room will be polled for events only if
it is world readable or the user has joined the room.
"""
from_token = pagination_config.from_token
if not from_token:
if pagination_config.from_token:
from_token = pagination_config.from_token
else:
from_token = self.event_sources.get_current_token()
limit = pagination_config.limit