mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-23 04:55:08 +01:00
This commit is contained in:
parent
0a0b9a271a
commit
f741673638
@ -61,8 +61,13 @@ class FollowRemoteAccountService < BaseService
|
|||||||
account.uri = get_account_uri(xml)
|
account.uri = get_account_uri(xml)
|
||||||
account.hub_url = hubs.first.attribute('href').value
|
account.hub_url = hubs.first.attribute('href').value
|
||||||
|
|
||||||
account.save!
|
begin
|
||||||
get_profile(body, account)
|
account.save!
|
||||||
|
get_profile(body, account)
|
||||||
|
rescue ActiveRecord::RecordNotUnique
|
||||||
|
# The account has been added by another worker!
|
||||||
|
return Account.find_remote(confirmed_username, confirmed_domain)
|
||||||
|
end
|
||||||
|
|
||||||
account
|
account
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user