about summary refs log tree commit diff
path: root/app/mailers
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-08-29 12:07:50 +0200
committerThibaut Girka <thib@sitedethib.com>2019-08-29 12:07:50 +0200
commit48b8a1f414e3d8430bd797e3db298fc5355ace2d (patch)
treec7b84ed81fb99b51eb2596df8ac1663d1998fa89 /app/mailers
parent79725f659d5e9c449df0ff73f9363407a0a064bd (diff)
parent4500dc2385d8571c494ea0277fe4ca415a264404 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/models/status.rb
- app/services/remove_status_service.rb
- db/schema.rb

All conflicts were due to the addition of a `deleted_at` attribute
to Statuses and reworked database indexes.
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,