about summary refs log tree commit diff
path: root/app/mailers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-08-23 22:37:23 +0200
committermultiple creatures <dev@multiple-creature.party>2020-02-27 14:02:57 -0600
commit1213311562928551918495a69e4c6f87236f6a66 (patch)
treedc1274de8877beee411b9a72efccc66cd11603ab /app/mailers
parent3681f7dcce8f82d2a4377a051952159cd03919c0 (diff)
port tootsuite#11639 to monsterfork: Add option to include reported statuses in warning e-mail
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/user_mailer.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index 942cee874..b41004acc 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -80,10 +80,11 @@ class UserMailer < Devise::Mailer
     end
   end
 
-  def warning(user, warning)
+  def warning(user, warning, status_ids = nil)
     @resource = user
     @warning  = warning
     @instance = Rails.configuration.x.local_domain
+    @statuses = Status.where(id: status_ids).includes(:account) if status_ids.is_a?(Array)
 
     I18n.with_locale(@resource.locale || I18n.default_locale) do
       mail to: @resource.email,