* Remove: #955 フィルターのアクション`half_warn` * Add: 「フィルター対象投稿の投稿者名やアイコンを表示する」設定 * Fix test
This commit is contained in:
parent
22bf14e9f0
commit
67064de265
19 changed files with 49 additions and 45 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue