Fix suspended accounts not being removed from follow request count in /api/v1/accounts/verify_credentials (#39858)

This commit is contained in:
Claire 2026-07-17 12:41:59 +02:00 committed by Tarrien
parent dab63149d0
commit 99cecbe6f3

View File

@ -14,7 +14,7 @@ class REST::CredentialAccountSerializer < REST::AccountSerializer
language: user.setting_default_language, language: user.setting_default_language,
note: object.note, note: object.note,
fields: object.fields.map(&:to_h), 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, hide_collections: object.hide_collections,
discoverable: object.discoverable, discoverable: object.discoverable,
indexable: object.indexable, indexable: object.indexable,