fix: always return following/followers counts, only hide pending for non-own profiles

This commit is contained in:
2026-06-04 02:19:27 +02:00
parent b1d667d3cb
commit a97e263ed3

View File

@@ -80,9 +80,6 @@ async fn load_social_counts(
user_id: uuid::Uuid, user_id: uuid::Uuid,
is_own_profile: bool, is_own_profile: bool,
) -> (usize, usize, Vec<PendingFollowerView>) { ) -> (usize, usize, Vec<PendingFollowerView>) {
if !is_own_profile {
return (0, 0, vec![]);
}
let following = ctx let following = ctx
.repos .repos
.social_query .social_query
@@ -95,6 +92,9 @@ async fn load_social_counts(
.count_accepted_followers(user_id) .count_accepted_followers(user_id)
.await .await
.unwrap_or(0); .unwrap_or(0);
if !is_own_profile {
return (following, followers, vec![]);
}
let pending = ctx let pending = ctx
.repos .repos
.social_query .social_query