about summary refs log tree commit diff
path: root/app/controllers/api/v1/follow_requests_controller.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-03-04 01:06:33 +0100
committerGitHub <noreply@github.com>2022-03-04 01:06:33 +0100
commit2ea754b8610b50cc93aeb1921ecdf7415efaf17e (patch)
tree28906a19f927a53bbe1a1076c74d369a781e3e81 /app/controllers/api/v1/follow_requests_controller.rb
parent04c3ac896a6054b8158cba06daa9f333f890efd4 (diff)
Fix duplicate notifications being possible after poll expiration (#17697)
Diffstat (limited to 'app/controllers/api/v1/follow_requests_controller.rb')
-rw-r--r--app/controllers/api/v1/follow_requests_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/v1/follow_requests_controller.rb b/app/controllers/api/v1/follow_requests_controller.rb
index 8276245a3..54ff0e11d 100644
--- a/app/controllers/api/v1/follow_requests_controller.rb
+++ b/app/controllers/api/v1/follow_requests_controller.rb
@@ -13,7 +13,7 @@ class Api::V1::FollowRequestsController < Api::BaseController
 
   def authorize
     AuthorizeFollowService.new.call(account, current_account)
-    NotifyService.new.call(current_account, :follow, Follow.find_by(account: account, target_account: current_account))
+    LocalNotificationWorker.perform_async(current_account.id, Follow.find_by(account: account, target_account: current_account).id, 'Follow', 'follow')
     render json: account, serializer: REST::RelationshipSerializer, relationships: relationships
   end