From 2ab060be0f82007f44689e9ea6eaab46b836d1fa Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 17 Jul 2026 12:41:59 +0200 Subject: [PATCH] Fix suspended accounts not being removed from follow request count in `/api/v1/accounts/verify_credentials` (#39858) --- app/serializers/rest/credential_account_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/serializers/rest/credential_account_serializer.rb b/app/serializers/rest/credential_account_serializer.rb index 0bbb7792cdd..2828f60fbf2 100644 --- a/app/serializers/rest/credential_account_serializer.rb +++ b/app/serializers/rest/credential_account_serializer.rb @@ -14,7 +14,7 @@ class REST::CredentialAccountSerializer < REST::AccountSerializer language: user.setting_default_language, note: object.note, fields: object.fields.map(&:to_h), - follow_requests_count: FollowRequest.where(target_account: object).limit(40).count, + follow_requests_count: Account.without_suspended.joins(:follow_requests).where(follow_requests: { target_account: object }).limit(40).count, hide_collections: object.hide_collections, discoverable: object.discoverable, indexable: object.indexable,