diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-19 19:20:07 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-19 19:20:07 +0100 |
commit | 2b116131d78460e5cbb8eacc30aaaf04106ea0fa (patch) | |
tree | 62ff3751b4f94b36335d5bd7d45374e024cd1d19 /app/services/process_interaction_service.rb | |
parent | e2b846f630cae00096a42dffeff759d0ef8e1c3e (diff) |
Adding e-mail notifications about mentions, follows, favourites and reblogs. Fixing another mention recording bug
Diffstat (limited to 'app/services/process_interaction_service.rb')
-rw-r--r-- | app/services/process_interaction_service.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/services/process_interaction_service.rb b/app/services/process_interaction_service.rb index cdc720083..c00f8c66a 100644 --- a/app/services/process_interaction_service.rb +++ b/app/services/process_interaction_service.rb @@ -55,6 +55,7 @@ class ProcessInteractionService < BaseService def follow!(account, target_account) account.follow!(target_account) + NotificationMailer.follow(target_account, account).deliver_later end def unfollow!(account, target_account) @@ -62,7 +63,9 @@ class ProcessInteractionService < BaseService end def favourite!(xml, from_account) - status(xml).favourites.where(account: from_account).first_or_create!(account: from_account) + current_status = status(xml) + current_status.favourites.where(account: from_account).first_or_create!(account: from_account) + NotificationMailer.favourite(current_status, from_account).deliver_later end def add_post!(body, account) |