discourse/app/serializers/watched_word_serializer.rb
Bianca Nenciu 533800a87b
Add watched words of type "replace" (#12020)
This commit includes other various improvements to watched words.

auto_silence_first_post_regex site setting was removed because it overlapped
with 'require approval' watched words.
2021-02-25 14:00:58 +02:00

14 lines
250 B
Ruby

# frozen_string_literal: true
class WatchedWordSerializer < ApplicationSerializer
attributes :id, :word, :replacement, :action
def action
WatchedWord.actions[object.action]
end
def include_replacement?
action == :replace
end
end