Remove digest e-mails (#17985)
* Remove digest e-mails * Remove digest-related code
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user