You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
926 B

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