mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-17 12:24:31 +00:00
This commit is contained in:
parent
4601a58ac2
commit
1ee675d68b
|
@ -13,7 +13,7 @@ class ActivityPub::Activity::Follow < ActivityPub::Activity
|
||||||
|
|
||||||
# Fast-forward repeat follow requests
|
# Fast-forward repeat follow requests
|
||||||
if @account.following?(target_account)
|
if @account.following?(target_account)
|
||||||
AuthorizeFollowService.new.call(@account, target_account, skip_follow_request: true)
|
AuthorizeFollowService.new.call(@account, target_account, skip_follow_request: true, follow_request_uri: @json['id'])
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
class AuthorizeFollowService < BaseService
|
class AuthorizeFollowService < BaseService
|
||||||
def call(source_account, target_account, **options)
|
def call(source_account, target_account, **options)
|
||||||
if options[:skip_follow_request]
|
if options[:skip_follow_request]
|
||||||
follow_request = FollowRequest.new(account: source_account, target_account: target_account)
|
follow_request = FollowRequest.new(account: source_account, target_account: target_account, uri: options[:follow_request_uri])
|
||||||
else
|
else
|
||||||
follow_request = FollowRequest.find_by!(account: source_account, target_account: target_account)
|
follow_request = FollowRequest.find_by!(account: source_account, target_account: target_account)
|
||||||
follow_request.authorize!
|
follow_request.authorize!
|
||||||
|
|
Loading…
Reference in a new issue