0
0
Fork 0

Add notifications for new reports (#18697)

This commit is contained in:
Eugen Rochko 2022-06-27 09:30:15 +02:00 committed by GitHub
parent 602f291da9
commit 2936f42a14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 235 additions and 17 deletions

View file

@ -39,8 +39,8 @@ class ReportService < BaseService
return if @report.unresolved_siblings?
User.staff.includes(:account).each do |u|
next unless u.allows_report_emails?
AdminMailer.new_report(u.account, @report).deliver_later
LocalNotificationWorker.perform_async(u.account_id, @report.id, 'Report', 'admin.report')
AdminMailer.new_report(u.account, @report).deliver_later if u.allows_report_emails?
end
end