mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-12 11:16:24 +02:00
respect filter.limit in the /messages endpoint
As far as I can tell, 'filter.limit' and the 'limit' query parameter are completely redundant.
This commit is contained in:
parent
296b777c04
commit
ecb0a55511
1 changed files with 3 additions and 1 deletions
|
@ -159,7 +159,9 @@ pub(crate) async fn get_message_events_route(
|
||||||
.lazy_load_confirm_delivery(sender_user, sender_device, &body.room_id, from)
|
.lazy_load_confirm_delivery(sender_user, sender_device, &body.room_id, from)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let limit = u64::from(body.limit).min(100) as usize;
|
let limit = u64::from(body.limit)
|
||||||
|
.min(body.filter.limit.map_or(u64::MAX, u64::from))
|
||||||
|
.min(100) as usize;
|
||||||
|
|
||||||
let next_token;
|
let next_token;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue