Skip to content

Commit

Permalink
Disables none account related emails.
Browse files Browse the repository at this point in the history
Disables Mastodon from sending notification emails of new followers, follower requests, boots and favs.
  • Loading branch information
Humblr committed Dec 16, 2018
1 parent d2f284b commit ada1c49
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions app/mailers/notification_mailer.rb
Expand Up @@ -13,7 +13,6 @@ def mention(recipient, notification)

locale_for_account(@me) do
thread_by_conversation(@status.conversation)
mail to: @me.user.email, subject: I18n.t('notification_mailer.mention.subject', name: @status.account.acct)
end
end

Expand All @@ -24,7 +23,6 @@ def follow(recipient, notification)
return if @me.user.disabled?

locale_for_account(@me) do
mail to: @me.user.email, subject: I18n.t('notification_mailer.follow.subject', name: @account.acct)
end
end

Expand All @@ -37,7 +35,6 @@ def favourite(recipient, notification)

locale_for_account(@me) do
thread_by_conversation(@status.conversation)
mail to: @me.user.email, subject: I18n.t('notification_mailer.favourite.subject', name: @account.acct)
end
end

Expand All @@ -50,7 +47,7 @@ def reblog(recipient, notification)

locale_for_account(@me) do
thread_by_conversation(@status.conversation)
mail to: @me.user.email, subject: I18n.t('notification_mailer.reblog.subject', name: @account.acct)

end
end

Expand All @@ -61,7 +58,6 @@ def follow_request(recipient, notification)
return if @me.user.disabled?

locale_for_account(@me) do
mail to: @me.user.email, subject: I18n.t('notification_mailer.follow_request.subject', name: @account.acct)
end
end

Expand All @@ -74,8 +70,6 @@ def digest(recipient, **opts)
return if @me.user.disabled? || @notifications.empty?

locale_for_account(@me) do
mail to: @me.user.email,
subject: I18n.t(:subject, scope: [:notification_mailer, :digest], count: @notifications.size)
end
end

Expand Down

0 comments on commit ada1c49

Please sign in to comment.