Handle both cases

This commit is contained in:
Erik Johnston 2024-08-19 18:14:36 +01:00
parent 569d884543
commit 29bd79728d

View file

@ -161,6 +161,12 @@ def get_rooms(from_token: SlidingSyncStreamToken) -> None:
ORDER BY COALESCE(j.event_stream_ordering, s.stream_ordering) DESC
"""
if from_token:
# Calculate what has changed.
...
else:
...
# TODO: Handle the event_stream_ordering returned being above the `to_token`.
# We can now sort and cap the rooms, noting if there have been changes