Add admin setting to disable followers count

This commit is contained in:
Thibaut Girka
2018-12-17 20:36:30 +01:00
committed by ThibG
parent 0cd367e295
commit a1c56fcef1
10 changed files with 29 additions and 11 deletions

View File

@ -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