diff options
author | Erik Johnston <erik@matrix.org> | 2020-09-08 15:00:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 15:00:17 +0100 |
commit | 0f545e6b9670fd780579445ff68dba95a8e08545 (patch) | |
tree | 54f2aafe4a391ae313f950490250b1dac6ffdd93 /synapse/notifier.py | |
parent | Use the right constructor for log records (#8278) (diff) | |
download | synapse-0f545e6b9670fd780579445ff68dba95a8e08545.tar.xz |
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).
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r-- | synapse/notifier.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py index b7f4041306..71f2370874 100644 --- a/synapse/notifier.py +++ b/synapse/notifier.py @@ -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 |