mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
FIX: Split link watched words from replace (#13196)
It was not clear that replace watched words can be used to replace text with URLs. This introduces a new watched word type that makes it easier to understand.
This commit is contained in:
@ -29,7 +29,8 @@ class SiteSerializer < ApplicationSerializer
|
||||
:censored_regexp,
|
||||
:shared_drafts_category_id,
|
||||
:custom_emoji_translation,
|
||||
:watched_words_replace
|
||||
:watched_words_replace,
|
||||
:watched_words_link
|
||||
)
|
||||
|
||||
has_many :categories, serializer: SiteCategorySerializer, embed: :objects
|
||||
@ -185,6 +186,10 @@ class SiteSerializer < ApplicationSerializer
|
||||
WordWatcher.word_matcher_regexps(:replace)
|
||||
end
|
||||
|
||||
def watched_words_link
|
||||
WordWatcher.word_matcher_regexps(:link)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def ordered_flags(flags)
|
||||
|
Reference in New Issue
Block a user