diff options
author | Erik Johnston <erik@matrix.org> | 2024-07-30 18:40:02 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2024-07-30 18:40:02 +0100 |
commit | 9c2354b2b1842c4b66f83db744012f5ef9560320 (patch) | |
tree | 50a1529c3a4c95e7c642c4d2a4b2db267b4a08e7 | |
parent | Handle increases in timeline limit (diff) | |
download | synapse-9c2354b2b1842c4b66f83db744012f5ef9560320.tar.xz |
Force limited=true
-rw-r--r-- | synapse/handlers/sliding_sync.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/handlers/sliding_sync.py b/synapse/handlers/sliding_sync.py index a88c66c4f7..8af820896a 100644 --- a/synapse/handlers/sliding_sync.py +++ b/synapse/handlers/sliding_sync.py @@ -1595,6 +1595,12 @@ class SlidingSyncHandler: stream=timeline_events[0].internal_metadata.stream_ordering - 1 ) + if ignore_timeline_bound: + # If we're ignoring the timeline bound we *must* set limited to + # true, as otherwise the client will append the received events + # to the timeline, rather than replacing it. + limited = True + # Make sure we don't expose any events that the client shouldn't see timeline_events = await filter_events_for_client( self.storage_controllers, |