mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 13:09:18 +08:00
FIX: 'default_categories_muted' site setting not working for anonymous users.
This commit is contained in:
parent
f49ef851df
commit
57bbcf4c5d
|
@ -895,6 +895,11 @@ class TopicQuery
|
|||
regular: CategoryUser.notification_levels[:regular],
|
||||
tracking: TopicUser.notification_levels[:tracking],
|
||||
category_id: category_id || -1)
|
||||
else
|
||||
category_ids = SiteSetting.default_categories_muted.split("|").map(&:to_i)
|
||||
category_ids -= [category_id] if category_id.present? && category_ids.include?(category_id)
|
||||
|
||||
list = list.where("topics.category_id NOT IN (?)", category_ids) if category_ids.present?
|
||||
end
|
||||
|
||||
list
|
||||
|
|
Loading…
Reference in New Issue
Block a user