Add preference for report notification e-mails, skip for duplicates (#8559)
If an unresolved report for the same target account already exists, no new notification is generated
This commit is contained in:
parent
a060beee72
commit
c593d6df9c
8 changed files with 36 additions and 2 deletions
|
@ -26,7 +26,10 @@ class ReportService < BaseService
|
|||
end
|
||||
|
||||
def notify_staff!
|
||||
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
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue