diff options
Diffstat (limited to 'app/serializers/rest/account_serializer.rb')
-rw-r--r-- | app/serializers/rest/account_serializer.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/serializers/rest/account_serializer.rb b/app/serializers/rest/account_serializer.rb index e644a3f91..9a3ca75dc 100644 --- a/app/serializers/rest/account_serializer.rb +++ b/app/serializers/rest/account_serializer.rb @@ -14,6 +14,7 @@ class REST::AccountSerializer < ActiveModel::Serializer attribute :suspended, if: :suspended? attribute :silenced, key: :limited, if: :silenced? + attribute :noindex, if: :local? class FieldSerializer < ActiveModel::Serializer include FormattingHelper @@ -107,7 +108,11 @@ class REST::AccountSerializer < ActiveModel::Serializer object.silenced? end - delegate :suspended?, :silenced?, to: :object + def noindex + object.user_prefers_noindex? + end + + delegate :suspended?, :silenced?, :local?, to: :object def moved_and_not_nested? object.moved? && object.moved_to_account.moved_to_account_id.nil? |