fix: context should be ASC and in larger chunks
This commit is contained in:
parent
8a0229a04d
commit
bc9f55d58c
1 changed files with 3 additions and 2 deletions
|
@ -27,13 +27,14 @@ pub async fn page(
|
||||||
AuthIdentity(auth): AuthIdentity,
|
AuthIdentity(auth): AuthIdentity,
|
||||||
) -> crate::ApiResult<JsonLD<serde_json::Value>> {
|
) -> crate::ApiResult<JsonLD<serde_json::Value>> {
|
||||||
let context = ctx.oid(&id);
|
let context = ctx.oid(&id);
|
||||||
let limit = page.batch.unwrap_or(20).min(50);
|
let limit = page.batch.unwrap_or(50).min(50);
|
||||||
let offset = page.offset.unwrap_or(0);
|
let offset = page.offset.unwrap_or(0);
|
||||||
|
|
||||||
let items = upub::Query::objects(auth.my_id())
|
let items = upub::Query::objects(auth.my_id())
|
||||||
.filter(auth.filter())
|
.filter(auth.filter())
|
||||||
.filter(model::object::Column::Context.eq(context))
|
.filter(model::object::Column::Context.eq(context))
|
||||||
.order_by(model::object::Column::Published, Order::Desc)
|
// note that this should be ASC so we get replies somewhat ordered
|
||||||
|
.order_by(model::object::Column::Published, Order::Asc)
|
||||||
.limit(limit)
|
.limit(limit)
|
||||||
.offset(offset)
|
.offset(offset)
|
||||||
.into_model::<RichActivity>()
|
.into_model::<RichActivity>()
|
||||||
|
|
Loading…
Reference in a new issue