0
0
Fork 0

Admin mailer parameterization (#25759)

This commit is contained in:
Matt Jankowski 2023-07-08 14:03:38 -04:00 committed by GitHub
parent 41a505513f
commit cf33028f35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 40 additions and 36 deletions

View file

@ -35,7 +35,7 @@ module Trends
return if links_requiring_review.empty? && tags_requiring_review.empty? && statuses_requiring_review.empty?
User.those_who_can(:manage_taxonomies).includes(:account).find_each do |user|
AdminMailer.new_trends(user.account, links_requiring_review, tags_requiring_review, statuses_requiring_review).deliver_later! if user.allows_trends_review_emails?
AdminMailer.with(recipient: user.account).new_trends(links_requiring_review, tags_requiring_review, statuses_requiring_review).deliver_later! if user.allows_trends_review_emails?
end
end

View file

@ -475,7 +475,7 @@ class User < ApplicationRecord
User.those_who_can(:manage_users).includes(:account).find_each do |u|
next unless u.allows_pending_account_emails?
AdminMailer.new_pending_account(u.account, self).deliver_later
AdminMailer.with(recipient: u.account).new_pending_account(self).deliver_later
end
end