The code powering m.abunchtell.com https://m.abunchtell.com
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

40 Zeilen
1.2 KiB

  1. # frozen_string_literal: true
  2. class NotificationMailer < ApplicationMailer
  3. helper StreamEntriesHelper
  4. def mention(mentioned_account, status)
  5. @me = mentioned_account
  6. @status = status
  7. return unless @me.user.settings(:notification_emails).mention
  8. mail to: @me.user.email, subject: "You were mentioned by #{@status.account.acct}"
  9. end
  10. def follow(followed_account, follower)
  11. @me = followed_account
  12. @account = follower
  13. return unless @me.user.settings(:notification_emails).follow
  14. mail to: @me.user.email, subject: "#{@account.acct} is now following you"
  15. end
  16. def favourite(target_status, from_account)
  17. @me = target_status.account
  18. @account = from_account
  19. @status = target_status
  20. return unless @me.user.settings(:notification_emails).favourite
  21. mail to: @me.user.email, subject: "#{@account.acct} favourited your status"
  22. end
  23. def reblog(target_status, from_account)
  24. @me = target_status.account
  25. @account = from_account
  26. @status = target_status
  27. return unless @me.user.settings(:notification_emails).reblog
  28. mail to: @me.user.email, subject: "#{@account.acct} reblogged your status"
  29. end
  30. end