mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Make autotag watched words case insensitive (#13043)
* FIX: Hide tag watched words if tagging is disabled These 'autotag' words were shown even if tagging was disabled. * FIX: Make autotag watched words case insensitive This commit also fixes the bug when no tag was applied if no other tag was already present.
This commit is contained in:
@@ -6,7 +6,9 @@ class Admin::WatchedWordsController < Admin::AdminController
|
||||
skip_before_action :check_xhr, only: [:download]
|
||||
|
||||
def index
|
||||
render_json_dump WatchedWordListSerializer.new(WatchedWord.by_action, scope: guardian, root: false)
|
||||
watched_words = WatchedWord.by_action
|
||||
watched_words = watched_words.where.not(action: WatchedWord.actions[:tag]) if !SiteSetting.tagging_enabled
|
||||
render_json_dump WatchedWordListSerializer.new(watched_words, scope: guardian, root: false)
|
||||
end
|
||||
|
||||
def create
|
||||
|
||||
Reference in New Issue
Block a user