mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-03-14 18:55:37 +00:00
fix spaces pagination bug
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
442bb9889c
commit
04656a7886
1 changed files with 13 additions and 11 deletions
|
@ -582,7 +582,7 @@ impl Service {
|
|||
parents.pop_front();
|
||||
parents.push_back(room);
|
||||
|
||||
let short_room_ids: Vec<_> = parents
|
||||
let next_short_room_ids: Vec<_> = parents
|
||||
.iter()
|
||||
.stream()
|
||||
.filter_map(|room_id| async move {
|
||||
|
@ -591,16 +591,18 @@ impl Service {
|
|||
.collect()
|
||||
.await;
|
||||
|
||||
Some(
|
||||
PaginationToken {
|
||||
short_room_ids,
|
||||
limit: UInt::new(max_depth)
|
||||
.expect("When sent in request it must have been valid UInt"),
|
||||
max_depth: UInt::new(max_depth)
|
||||
.expect("When sent in request it must have been valid UInt"),
|
||||
suggested_only,
|
||||
}
|
||||
.to_string(),
|
||||
(next_short_room_ids != short_room_ids && !next_short_room_ids.is_empty()).then(
|
||||
|| {
|
||||
PaginationToken {
|
||||
short_room_ids: next_short_room_ids,
|
||||
limit: UInt::new(max_depth)
|
||||
.expect("When sent in request it must have been valid UInt"),
|
||||
max_depth: UInt::new(max_depth)
|
||||
.expect("When sent in request it must have been valid UInt"),
|
||||
suggested_only,
|
||||
}
|
||||
.to_string()
|
||||
},
|
||||
)
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Add table
Reference in a new issue