about summary refs log tree commit diff
path: root/app/mailers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-26 21:52:03 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-26 21:52:03 +0100
commit2146ac91a004bad2a6c4dc1d01599a85515928f5 (patch)
tree0e65a4537c5c33f9e273d8646f1eded0eeb1e38c /app/mailers
parent3689c119f0ad8d523ab8deb3c2c8ed0a9c84db6e (diff)
Follow requests send e-mail notifications, but are excluded from notifications API
Better initial state for unlisted/nsfw toggles
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/notification_mailer.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb
index 7b2cac7f3..a1b084682 100644
--- a/app/mailers/notification_mailer.rb
+++ b/app/mailers/notification_mailer.rb
@@ -40,4 +40,13 @@ class NotificationMailer < ApplicationMailer
       mail to: @me.user.email, subject: I18n.t('notification_mailer.reblog.subject', name: @account.acct)
     end
   end
+
+  def follow_request(recipient, notification)
+    @me      = recipient
+    @account = notification.from_account
+
+    I18n.with_locale(@me.user.locale || I18n.default_locale) do
+      mail to: @me.user.email, subject: I18n.t('notification_mailer.follow_request.subject', name: @account.acct)
+    end
+  end
 end