mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Refactor watched words (#24163)
- Ignore only invalid words, not all words if one of them is invalid - The naming scheme for methods was inconsistent - Optimize regular expressions
This commit is contained in:
@@ -421,7 +421,7 @@ class AdminDashboardData
|
||||
def watched_words_check
|
||||
WatchedWord.actions.keys.each do |action|
|
||||
begin
|
||||
WordWatcher.word_matcher_regexp_list(action, raise_errors: true)
|
||||
WordWatcher.compiled_regexps_for_action(action, raise_errors: true)
|
||||
rescue RegexpError => e
|
||||
translated_action = I18n.t("admin_js.admin.watched_words.actions.#{action}")
|
||||
I18n.t(
|
||||
|
||||
Reference in New Issue
Block a user