diff --git a/src/activitypub/user/following.rs b/src/activitypub/user/following.rs index c09ee6e6..35d6b6e5 100644 --- a/src/activitypub/user/following.rs +++ b/src/activitypub/user/following.rs @@ -34,9 +34,11 @@ pub async fn page( let offset = page.offset.unwrap_or(0); match model::relation::Entity::find() .filter(Condition::all().add(if OUTGOING { Follower } else { Following }.eq(ctx.uid(id.clone())))) + .select_only() .select_column(if OUTGOING { Following } else { Follower }) .limit(limit) .offset(page.offset.unwrap_or(0)) + .into_tuple::() .all(ctx.db()).await { Err(e) => { @@ -49,7 +51,7 @@ pub async fn page( &url!(ctx, "/users/{id}/{follow___}"), offset, limit, - following.into_iter().map(|x| Node::link(x.following)).collect() + following.into_iter().map(Node::link).collect() ).ld_context() )) },