diff --git a/app/serializers/rest/account_serializer.rb b/app/serializers/rest/account_serializer.rb index 6c6a587e51..62a0273e55 100644 --- a/app/serializers/rest/account_serializer.rb +++ b/app/serializers/rest/account_serializer.rb @@ -5,7 +5,7 @@ class REST::AccountSerializer < ActiveModel::Serializer include FormattingHelper attributes :id, :username, :acct, :display_name, :locked, :bot, :discoverable, :group, :created_at, - :note, :url, :avatar, :avatar_static, :header, :header_static, :searchability, :dissubscribable, + :note, :url, :avatar, :avatar_static, :header, :header_static, :searchability, :subscribable, :followers_count, :following_count, :statuses_count, :last_status_at has_one :moved_to_account, key: :moved, serializer: REST::AccountSerializer, if: :moved_and_not_nested? @@ -106,6 +106,10 @@ class REST::AccountSerializer < ActiveModel::Serializer object.suspended? ? false : object.discoverable end + def subscribable + !object.dissubscribable + end + def moved_to_account object.suspended? ? nil : AccountDecorator.new(object.moved_to_account) end