From 9ae00a4a0c0b36628a05898912b676c65918deb8 Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 15 Jan 2025 01:53:42 +0100 Subject: [PATCH] fix: also join object for self auth check --- upub/routes/src/activitypub/object/likes.rs | 1 + upub/routes/src/activitypub/object/shares.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/upub/routes/src/activitypub/object/likes.rs b/upub/routes/src/activitypub/object/likes.rs index 9bfe5ac..3e8ad77 100644 --- a/upub/routes/src/activitypub/object/likes.rs +++ b/upub/routes/src/activitypub/object/likes.rs @@ -45,6 +45,7 @@ pub async fn page( ]) .join(sea_orm::JoinType::InnerJoin, upub::model::like::Relation::Activities.def()) .join(sea_orm::JoinType::InnerJoin, upub::model::activity::Relation::Addressing.def()) + .join(sea_orm::JoinType::InnerJoin, upub::model::activity::Relation::Objects.def()) .filter(auth.filter_activities()) .filter(upub::model::like::Column::Object.eq(internal)) .order_by_desc(upub::model::like::Column::Published) diff --git a/upub/routes/src/activitypub/object/shares.rs b/upub/routes/src/activitypub/object/shares.rs index 824c9c7..0581e0c 100644 --- a/upub/routes/src/activitypub/object/shares.rs +++ b/upub/routes/src/activitypub/object/shares.rs @@ -45,6 +45,7 @@ pub async fn page( ]) .join(sea_orm::JoinType::InnerJoin, upub::model::announce::Relation::Activities.def()) .join(sea_orm::JoinType::InnerJoin, upub::model::activity::Relation::Addressing.def()) + .join(sea_orm::JoinType::InnerJoin, upub::model::activity::Relation::Objects.def()) .filter(auth.filter_activities()) .filter(upub::model::announce::Column::Object.eq(internal)) .order_by_desc(upub::model::announce::Column::Published)