Add noai config

This commit is contained in:
KMY 2023-05-11 10:57:42 +09:00
parent 2317e7ddac
commit 424dc584a9
9 changed files with 24 additions and 4 deletions

View file

@ -15,6 +15,7 @@ class REST::AccountSerializer < ActiveModel::Serializer
attribute :suspended, if: :suspended?
attribute :silenced, key: :limited, if: :silenced?
attribute :noindex, if: :local?
attribute :noai, if: :local?
attribute :memorial, if: :memorial?
@ -146,6 +147,10 @@ class REST::AccountSerializer < ActiveModel::Serializer
object.user_prefers_noindex?
end
def noai
object.user&.setting_noai
end
delegate :suspended?, :silenced?, :local?, :memorial?, to: :object
def moved_and_not_nested?