diff --git a/upub/core/src/selector/query.rs b/upub/core/src/selector/query.rs index 7cfab01..6cf7f1a 100644 --- a/upub/core/src/selector/query.rs +++ b/upub/core/src/selector/query.rs @@ -52,7 +52,6 @@ impl Query { let mut select = model::addressing::Entity::find() .distinct() .join(sea_orm::JoinType::InnerJoin, model::addressing::Relation::Objects.def()) - .order_by(model::object::Column::Published, Order::Desc) .select_only(); for col in model::object::Column::iter() { diff --git a/upub/routes/src/activitypub/object/context.rs b/upub/routes/src/activitypub/object/context.rs index 618b136..4b4621f 100644 --- a/upub/routes/src/activitypub/object/context.rs +++ b/upub/routes/src/activitypub/object/context.rs @@ -1,5 +1,5 @@ use axum::extract::{Path, Query, State}; -use sea_orm::{ColumnTrait, Condition, PaginatorTrait, QueryFilter, QuerySelect}; +use sea_orm::{ColumnTrait, Condition, Order, PaginatorTrait, QueryFilter, QueryOrder, QuerySelect}; use upub::{model, selector::{BatchFillable, RichActivity}, Context}; use crate::{activitypub::Pagination, builders::JsonLD, AuthIdentity, Identity}; @@ -45,7 +45,7 @@ pub async fn page( let items = upub::Query::objects(auth.my_id()) .filter(filter) - // TODO also limit to only local activities + .order_by(model::object::Column::Published, Order::Desc) .limit(limit) .offset(offset) .into_model::()