From 256e880d6cf8f4f96b3837d53612a4f0ee10b4eb Mon Sep 17 00:00:00 2001 From: alemi Date: Fri, 27 Dec 2024 02:16:22 +0100 Subject: [PATCH] fix: likes query joins --- upub/routes/src/activitypub/actor/likes.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/upub/routes/src/activitypub/actor/likes.rs b/upub/routes/src/activitypub/actor/likes.rs index d4920b2..c93aad0 100644 --- a/upub/routes/src/activitypub/actor/likes.rs +++ b/upub/routes/src/activitypub/actor/likes.rs @@ -31,9 +31,9 @@ pub async fn page( let (limit, offset) = page.pagination(); - let items : Vec = upub::Query::objects(auth.my_id(), true) - .join(sea_orm::JoinType::InnerJoin, upub::model::like::Relation::Objects.def()) - .join(sea_orm::JoinType::InnerJoin, upub::model::activity::Relation::Likes.def()) + let items : Vec = upub::Query::objects(None, true) + .join(sea_orm::JoinType::InnerJoin, upub::model::object::Relation::Likes.def()) + .join(sea_orm::JoinType::InnerJoin, upub::model::like::Relation::Activities.def()) .filter(auth.filter_activities()) .filter(upub::model::like::Column::Actor.eq(user.internal)) .order_by_desc(upub::model::like::Column::Published)