Merge commit '610cf6c3713e414995ea1a57110db400ccb88dd2' into glitch-soc/merge-upstream

Conflicts:
- `app/models/trends.rb`:
  Conflict due to glitch-soc's code splitting trends mailing depending on type.
  Ported upstream's changes.
This commit is contained in:
Claire
2023-07-12 15:38:35 +02:00
16 changed files with 104 additions and 76 deletions

View File

@@ -23,7 +23,7 @@ class AppealService < BaseService
def notify_staff!
User.those_who_can(:manage_appeals).includes(:account).each do |u|
AdminMailer.new_appeal(u.account, @appeal).deliver_later if u.allows_appeal_emails?
AdminMailer.with(recipient: u.account).new_appeal(@appeal).deliver_later if u.allows_appeal_emails?
end
end
end

View File

@@ -40,7 +40,7 @@ class ReportService < BaseService
User.those_who_can(:manage_reports).includes(:account).each do |u|
LocalNotificationWorker.perform_async(u.account_id, @report.id, 'Report', 'admin.report')
AdminMailer.new_report(u.account, @report).deliver_later if u.allows_report_emails?
AdminMailer.with(recipient: u.account).new_report(@report).deliver_later if u.allows_report_emails?
end
end