Change: #955 フィルターアクションの「アカウント名だけを出し、本文は警告で隠す」を削除し、外観設定に移動 (#970)

* Remove: #955 フィルターのアクション`half_warn`

* Add: 「フィルター対象投稿の投稿者名やアイコンを表示する」設定

* Fix test
This commit is contained in:
KMY(雪あすか) 2025-01-23 19:18:40 +09:00 committed by GitHub
parent 22bf14e9f0
commit 67064de265
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 49 additions and 45 deletions

View file

@ -48,6 +48,7 @@ class InitialStateSerializer < ActiveModel::Serializer
object_account_user.setting_show_quote_in_home ? nil : 'quote_in_home',
object_account_user.setting_show_quote_in_public ? nil : 'quote_in_public',
object_account_user.setting_show_relationships ? nil : 'relationships',
object_account_user.setting_show_avatar_on_filter ? nil : 'avatar_on_filter',
].compact
store[:enabled_visibilities] = enabled_visibilities
store[:featured_tags] = object.current_account.featured_tags.pluck(:name)

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
class REST::FilterSerializer < ActiveModel::Serializer
attributes :id, :title, :exclude_follows, :exclude_localusers, :with_quote, :with_profile, :context, :expires_at, :filter_action, :filter_action_ex
attributes :id, :title, :exclude_follows, :exclude_localusers, :with_quote, :with_profile, :context, :expires_at, :filter_action
has_many :keywords, serializer: REST::FilterKeywordSerializer, if: :rules_requested?
has_many :statuses, serializer: REST::FilterStatusSerializer, if: :rules_requested?
@ -12,14 +12,4 @@ class REST::FilterSerializer < ActiveModel::Serializer
def rules_requested?
instance_options[:rules_requested]
end
def filter_action
return :warn if object.half_warn_action?
object.filter_action
end
def filter_action_ex
object.filter_action
end
end