mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Move the location of the TriggerWebhookWorker call to a more appropriate place thanks to @mjankowski's review
This commit is contained in:
parent
d99bd56dac
commit
a2ccad787e
1 changed files with 2 additions and 8 deletions
|
@ -39,9 +39,7 @@ class FollowService < BaseService
|
|||
if (@target_account.locked? && !@options[:bypass_locked]) || @source_account.silenced? || @target_account.activitypub?
|
||||
request_follow!
|
||||
elsif @target_account.local?
|
||||
follow = direct_follow!
|
||||
trigger_webhooks follow.id
|
||||
follow
|
||||
direct_follow!
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -84,7 +82,7 @@ class FollowService < BaseService
|
|||
|
||||
LocalNotificationWorker.perform_async(@target_account.id, follow.id, follow.class.name, 'follow')
|
||||
MergeWorker.perform_async(@target_account.id, @source_account.id)
|
||||
|
||||
TriggerWebhookWorker.perform_async('follow.created', 'Follow', follow.id)
|
||||
follow
|
||||
end
|
||||
|
||||
|
@ -95,8 +93,4 @@ class FollowService < BaseService
|
|||
def follow_options
|
||||
@options.slice(:reblogs, :notify, :languages)
|
||||
end
|
||||
|
||||
def trigger_webhooks(follow_id)
|
||||
TriggerWebhookWorker.perform_async('follow.created', 'Follow', follow_id)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue