mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
add DiscourseEvent triggers necessary to update a user's permissions before they're notified
This commit is contained in:
@@ -32,6 +32,7 @@ module Jobs
|
||||
WHERE cu.category_id = ? AND cu.user_id = users.id AND cu.notification_level = ?
|
||||
)', post.topic.category_id, CategoryUser.notification_levels[:muted])
|
||||
|
||||
DiscourseEvent.trigger(:notify_mailing_list_subscribers, users, post)
|
||||
users.find_each do |user|
|
||||
if Guardian.new(user).can_see?(post)
|
||||
if EmailLog.reached_max_emails?(user)
|
||||
|
||||
Reference in New Issue
Block a user