fix spaces pagination bug

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-02-05 03:00:47 +00:00
parent 442bb9889c
commit 04656a7886

View file

@ -582,7 +582,7 @@ impl Service {
parents.pop_front(); parents.pop_front();
parents.push_back(room); parents.push_back(room);
let short_room_ids: Vec<_> = parents let next_short_room_ids: Vec<_> = parents
.iter() .iter()
.stream() .stream()
.filter_map(|room_id| async move { .filter_map(|room_id| async move {
@ -591,16 +591,18 @@ impl Service {
.collect() .collect()
.await; .await;
Some( (next_short_room_ids != short_room_ids && !next_short_room_ids.is_empty()).then(
PaginationToken { || {
short_room_ids, PaginationToken {
limit: UInt::new(max_depth) short_room_ids: next_short_room_ids,
.expect("When sent in request it must have been valid UInt"), limit: UInt::new(max_depth)
max_depth: UInt::new(max_depth) .expect("When sent in request it must have been valid UInt"),
.expect("When sent in request it must have been valid UInt"), max_depth: UInt::new(max_depth)
suggested_only, .expect("When sent in request it must have been valid UInt"),
} suggested_only,
.to_string(), }
.to_string()
},
) )
} else { } else {
None None