fix: oops should be an OR not an AND

This commit is contained in:
əlemi 2024-07-05 04:39:03 +02:00
parent abb8095685
commit 98f1e5ee06
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -28,14 +28,18 @@ pub async fn page(
) -> crate::ApiResult<JsonLD<serde_json::Value>> {
let context = ctx.oid(&id);
let mut filter = Condition::all()
.add(auth.filter())
.add(model::object::Column::Context.eq(context));
let mut filter = Condition::any()
.add(auth.filter());
if let Identity::Local { ref id, .. } = auth {
filter = filter.add(model::object::Column::AttributedTo.eq(id));
}
filter = Condition::all()
.add(model::object::Column::Context.eq(context))
.add(filter);
crate::builders::paginate_feed(
upub::url!(ctx, "/objects/{id}/context/page"),
filter,