limit sync response events to within the since/next_batch window

fixes #606

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-11-20 19:42:34 +00:00
parent 5256cad396
commit bae0667066
3 changed files with 7 additions and 4 deletions

View file

@ -473,7 +473,7 @@ pub(crate) async fn sync_events_v4_route(
(timeline_pdus, limited) = (Vec::new(), true);
} else {
(timeline_pdus, limited) =
match load_timeline(&services, sender_user, room_id, roomsincecount, *timeline_limit).await {
match load_timeline(&services, sender_user, room_id, roomsincecount, None, *timeline_limit).await {
Ok(value) => value,
Err(err) => {
warn!("Encountered missing timeline in {}, error {}", room_id, err);