From a1c56fcef124b08fc2676d38fd79ed72d660d865 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 17 Dec 2018 20:36:30 +0100 Subject: Add admin setting to disable followers count --- app/serializers/rest/account_serializer.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/serializers/rest') diff --git a/app/serializers/rest/account_serializer.rb b/app/serializers/rest/account_serializer.rb index 12adc971c..a3f2ad036 100644 --- a/app/serializers/rest/account_serializer.rb +++ b/app/serializers/rest/account_serializer.rb @@ -51,4 +51,8 @@ class REST::AccountSerializer < ActiveModel::Serializer def moved_and_not_nested? object.moved? && object.moved_to_account.moved_to_account_id.nil? end + + def followers_count + Setting.hide_followers_count ? -1 : object.followers_count + end end -- cgit