diff options
Diffstat (limited to 'app/serializers/rest/account_serializer.rb')
-rw-r--r-- | app/serializers/rest/account_serializer.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/rest/account_serializer.rb b/app/serializers/rest/account_serializer.rb index f6fad9fe1..b95a61e89 100644 --- a/app/serializers/rest/account_serializer.rb +++ b/app/serializers/rest/account_serializer.rb @@ -88,6 +88,10 @@ class REST::AccountSerializer < ActiveModel::Serializer object.last_status_at&.to_date&.iso8601 end + def followers_count + (Setting.hide_followers_count || object.user&.setting_hide_followers_count) ? -1 : object.followers_count + end + def display_name object.suspended? ? '' : object.display_name end |