Add exclude_follows, exclude_localusers settings to custom_filter

This commit is contained in:
KMY 2023-07-14 12:16:08 +09:00
parent fb9dbfc866
commit 5a0483ed21
15 changed files with 77 additions and 22 deletions

View file

@ -2,7 +2,7 @@
class REST::V1::FilterSerializer < ActiveModel::Serializer
attributes :id, :phrase, :context, :whole_word, :expires_at,
:irreversible
:irreversible, :exclude_follows, :exclude_localusers
delegate :context, :expires_at, to: :custom_filter
@ -18,6 +18,10 @@ class REST::V1::FilterSerializer < ActiveModel::Serializer
custom_filter.irreversible?
end
delegate :exclude_follows, to: :custom_filter
delegate :exclude_localusers, to: :custom_filter
private
def custom_filter