forked from alemi/upub
fix: oops should be an OR not an AND
This commit is contained in:
parent
abb8095685
commit
98f1e5ee06
1 changed files with 7 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue