From bc9f55d58c63cfa3b49c4fdae79751e1082525e8 Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 21 Nov 2024 00:30:54 +0100 Subject: [PATCH] fix: context should be ASC and in larger chunks --- upub/routes/src/activitypub/object/context.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/upub/routes/src/activitypub/object/context.rs b/upub/routes/src/activitypub/object/context.rs index 4c15a8d..4a55f0e 100644 --- a/upub/routes/src/activitypub/object/context.rs +++ b/upub/routes/src/activitypub/object/context.rs @@ -27,13 +27,14 @@ pub async fn page( AuthIdentity(auth): AuthIdentity, ) -> crate::ApiResult> { 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 items = upub::Query::objects(auth.my_id()) .filter(auth.filter()) .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) .offset(offset) .into_model::()