mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 11:33:06 +08:00
533800a87b
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.
14 lines
250 B
Ruby
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
|