|
|
|
@ -14,7 +14,6 @@ class FollowRemoteAccountService < BaseService
|
|
|
|
|
username, domain = uri.split('@')
|
|
|
|
|
|
|
|
|
|
return Account.find_local(username) if TagManager.instance.local_domain?(domain)
|
|
|
|
|
return nil if DomainBlock.blocked?(domain)
|
|
|
|
|
|
|
|
|
|
account = Account.find_remote(username, domain)
|
|
|
|
|
return account unless account.nil?
|
|
|
|
@ -41,6 +40,7 @@ class FollowRemoteAccountService < BaseService
|
|
|
|
|
account.url = data.link('http://webfinger.net/rel/profile-page').href
|
|
|
|
|
account.public_key = magic_key_to_pem(data.link('magic-public-key').href)
|
|
|
|
|
account.private_key = nil
|
|
|
|
|
account.suspended = true if DomainBlock.blocked?(domain)
|
|
|
|
|
|
|
|
|
|
xml = get_feed(account.remote_url)
|
|
|
|
|
hubs = get_hubs(xml)
|
|
|
|
|