fix: local outbox joins actor to know local ones

This commit is contained in:
əlemi 2024-12-27 15:36:10 +01:00
parent b350e4d9bb
commit edbf381b31
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -1,5 +1,5 @@
use axum::{extract::{Query, State}, http::StatusCode, Json};
use sea_orm::{ColumnTrait, Condition, QueryFilter, QuerySelect};
use sea_orm::{ColumnTrait, Condition, QueryFilter, QueryOrder, QuerySelect, RelationTrait};
use upub::{selector::{RichActivity, RichFillable}, Context};
use crate::{activitypub::{CreationResult, Pagination}, AuthIdentity, builders::JsonLD};
@ -19,6 +19,7 @@ pub async fn page(
let (limit, offset) = page.pagination();
let items = upub::Query::feed(auth.my_id(), page.replies.unwrap_or(true))
.join(sea_orm::JoinType::InnerJoin, upub::model::object::Relation::Actors.def())
.filter(filter)
.limit(limit)
.offset(offset)