summary refs log tree commit diff
path: root/synapse/notifier.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-09-08 15:00:17 +0100
committerGitHub <noreply@github.com>2020-09-08 15:00:17 +0100
commit0f545e6b9670fd780579445ff68dba95a8e08545 (patch)
tree54f2aafe4a391ae313f950490250b1dac6ffdd93 /synapse/notifier.py
parentUse the right constructor for log records (#8278) (diff)
downloadsynapse-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.py5
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