summaryrefslogtreecommitdiffstats
path: root/app/services/process_interaction_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-20 00:33:02 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-20 19:39:58 +0100
commitda2ef4d676ff71e6ab3edf8d1a7cee8bf6b6d353 (patch)
treef73fa34a3323a70d5dcba360f781bce5325e3ed1 /app/services/process_interaction_service.rb
parent3838e6836d47797a4e8ca20afa70eebefb68da26 (diff)
Adding unified streamable notifications
Diffstat (limited to 'app/services/process_interaction_service.rb')
-rw-r--r--app/services/process_interaction_service.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/process_interaction_service.rb b/app/services/process_interaction_service.rb
index ecd3c2b2c4b..e7bb3c73b35 100644
--- a/app/services/process_interaction_service.rb
+++ b/app/services/process_interaction_service.rb
@@ -65,8 +65,8 @@ class ProcessInteractionService < BaseService
end
def follow!(account, target_account)
- account.follow!(target_account)
- NotificationMailer.follow(target_account, account).deliver_later unless target_account.blocking?(account)
+ follow = account.follow!(target_account)
+ NotifyService.new.call(target_account, follow)
end
def unfollow!(account, target_account)
@@ -83,8 +83,8 @@ class ProcessInteractionService < BaseService
def favourite!(xml, 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 unless current_status.account.blocking?(from_account)
+ favourite = current_status.favourites.where(account: from_account).first_or_create!(account: from_account)
+ NotifyService.new.call(current_status.account, favourite)
end
def add_post!(body, account)