diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-03-04 01:06:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 01:06:33 +0100 |
commit | 2ea754b8610b50cc93aeb1921ecdf7415efaf17e (patch) | |
tree | 28906a19f927a53bbe1a1076c74d369a781e3e81 /app/lib/activitypub/activity/follow.rb | |
parent | 04c3ac896a6054b8158cba06daa9f333f890efd4 (diff) |
Fix duplicate notifications being possible after poll expiration (#17697)
Diffstat (limited to 'app/lib/activitypub/activity/follow.rb')
-rw-r--r-- | app/lib/activitypub/activity/follow.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/activitypub/activity/follow.rb b/app/lib/activitypub/activity/follow.rb index 4efb84b8c..97e41ab78 100644 --- a/app/lib/activitypub/activity/follow.rb +++ b/app/lib/activitypub/activity/follow.rb @@ -31,10 +31,10 @@ class ActivityPub::Activity::Follow < ActivityPub::Activity follow_request = FollowRequest.create!(account: @account, target_account: target_account, uri: @json['id']) if target_account.locked? || @account.silenced? - NotifyService.new.call(target_account, :follow_request, follow_request) + LocalNotificationWorker.perform_async(target_account.id, follow_request.id, 'FollowRequest', 'follow_request') else AuthorizeFollowService.new.call(@account, target_account) - NotifyService.new.call(target_account, :follow, ::Follow.find_by(account: @account, target_account: target_account)) + LocalNotificationWorker.perform_async(target_account.id, ::Follow.find_by(account: @account, target_account: target_account).id, 'Follow', 'follow') end end |