mirror of
https://github.com/discourse/discourse.git
synced 2025-03-01 16:59:22 +00:00
FIX: remove magic numbers in notification levels.
ba5b78a34874d393440e7eee0aee07f0b213c4ae
This commit is contained in:
parent
0c0192e7da
commit
12bc6ce8c1
@ -207,9 +207,9 @@ class CategoryUser < ActiveRecord::Base
|
||||
SiteSetting.default_categories_watching.split("|"),
|
||||
SiteSetting.default_categories_tracking.split("|"),
|
||||
SiteSetting.default_categories_watching_first_post.split("|"),
|
||||
].flatten.map { |id| [id.to_i, 1] }
|
||||
].flatten.map { |id| [id.to_i, notification_levels[:regular]] }
|
||||
|
||||
notification_levels += SiteSetting.default_categories_muted.split("|").map { |id| [id.to_i, 0] }
|
||||
notification_levels += SiteSetting.default_categories_muted.split("|").map { |id| [id.to_i, notification_levels[:muted]] }
|
||||
else
|
||||
notification_levels = CategoryUser.where(user: guardian.user).pluck(:category_id, :notification_level)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user