fix: also join object for self auth check

This commit is contained in:
əlemi 2025-01-15 01:53:42 +01:00
parent 0fba4d6838
commit 9ae00a4a0c
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 2 additions and 0 deletions

View file

@ -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::like::Relation::Activities.def())
.join(sea_orm::JoinType::InnerJoin, upub::model::activity::Relation::Addressing.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(auth.filter_activities())
.filter(upub::model::like::Column::Object.eq(internal)) .filter(upub::model::like::Column::Object.eq(internal))
.order_by_desc(upub::model::like::Column::Published) .order_by_desc(upub::model::like::Column::Published)

View file

@ -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::announce::Relation::Activities.def())
.join(sea_orm::JoinType::InnerJoin, upub::model::activity::Relation::Addressing.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(auth.filter_activities())
.filter(upub::model::announce::Column::Object.eq(internal)) .filter(upub::model::announce::Column::Object.eq(internal))
.order_by_desc(upub::model::announce::Column::Published) .order_by_desc(upub::model::announce::Column::Published)