optional arguments for timeline pdus iterations

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-11-07 04:49:01 +00:00
parent 13ef6dcbcf
commit 1f2e939fd5
6 changed files with 26 additions and 21 deletions

View file

@ -14,7 +14,7 @@ async fn load_timeline(
let last_timeline_count = services
.rooms
.timeline
.last_timeline_count(sender_user, room_id)
.last_timeline_count(Some(sender_user), room_id)
.await?;
if last_timeline_count <= roomsincecount {
@ -24,7 +24,7 @@ async fn load_timeline(
let mut non_timeline_pdus = services
.rooms
.timeline
.pdus_rev(sender_user, room_id, PduCount::max())
.pdus_rev(Some(sender_user), room_id, None)
.await?
.ready_take_while(|(pducount, _)| *pducount > roomsincecount);