about summary refs log tree commit diff
path: root/app/mailers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-08-25 23:38:22 +0200
committerGitHub <noreply@github.com>2022-08-25 23:38:22 +0200
commit0b3e4fd5de392969b624719b2eb3f86277b6ac1f (patch)
tree3a036e1d0652ed199be6fc09ce0cd4a3ac398c5f /app/mailers
parent5b0e8cc92b9ca0ab0dc24366d95f67a88c470173 (diff)
Remove digest e-mails (#17985)
* Remove digest e-mails

* Remove digest-related code
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/notification_mailer.rb18
1 files changed, 0 insertions, 18 deletions
diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb
index 9e683b6a1..ab73826ab 100644
--- a/app/mailers/notification_mailer.rb
+++ b/app/mailers/notification_mailer.rb
@@ -66,24 +66,6 @@ class NotificationMailer < ApplicationMailer
     end
   end
 
-  def digest(recipient, **opts)
-    return unless recipient.user.functional?
-
-    @me                  = recipient
-    @since               = opts[:since] || [@me.user.last_emailed_at, (@me.user.current_sign_in_at + 1.day)].compact.max
-    @notifications_count = Notification.where(account: @me, activity_type: 'Mention').where('created_at > ?', @since).count
-
-    return if @notifications_count.zero?
-
-    @notifications = Notification.where(account: @me, activity_type: 'Mention').where('created_at > ?', @since).limit(40)
-    @follows_since = Notification.where(account: @me, activity_type: 'Follow').where('created_at > ?', @since).count
-
-    locale_for_account(@me) do
-      mail to: @me.user.email,
-           subject: I18n.t(:subject, scope: [:notification_mailer, :digest], count: @notifications_count)
-    end
-  end
-
   private
 
   def thread_by_conversation(conversation)