about summary refs log tree commit diff
path: root/app/mailers
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-08-30 00:18:08 +0200
committerGitHub <noreply@github.com>2019-08-30 00:18:08 +0200
commit2848c08953a8555e06791170dbf1090575e05d8a (patch)
tree53e8e98051c24ac4fb32ce5692e241b6a6391de3 /app/mailers
parent79725f659d5e9c449df0ff73f9363407a0a064bd (diff)
parent969d04385157175dc9c9f46987976d8fc5771707 (diff)
Merge pull request #1208 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/user_mailer.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index 8f3a4ab3a..b41004acc 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -5,6 +5,7 @@ class UserMailer < Devise::Mailer
 
   helper :application
   helper :instance
+  helper :statuses
 
   add_template_helper RoutingHelper
 
@@ -79,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,