diff options
author | Eugen <eugen@zeonfederated.com> | 2017-04-08 11:36:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-08 11:36:35 +0200 |
commit | 55d03da303dcc2d0cdf0d642534d0f6337e252c9 (patch) | |
tree | 4bc22eeff2d2c8e2599179cc987ef1d66774af2a /app | |
parent | 2c3a730eae10d4cd4a65fcf3a933dca7ba091630 (diff) | |
parent | b2a7218ab7867e5bea9d1b0894719c5becb1d7da (diff) |
Merge pull request #1213 from tootsuite/fix-accounts-initial-case
Fix #801 - Respect webfinger's canonical response of username/domain
Diffstat (limited to 'app')
-rw-r--r-- | app/services/follow_remote_account_service.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/services/follow_remote_account_service.rb b/app/services/follow_remote_account_service.rb index 936953429..a008d7db5 100644 --- a/app/services/follow_remote_account_service.rb +++ b/app/services/follow_remote_account_service.rb @@ -20,8 +20,6 @@ class FollowRemoteAccountService < BaseService Rails.logger.debug "Looking up webfinger for #{uri}" - account = Account.new(username: username, domain: domain) - data = Goldfinger.finger("acct:#{uri}") raise Goldfinger::Error, 'Missing resource links' if data.link('http://schemas.google.com/g/2010#updates-from').nil? || data.link('salmon').nil? || data.link('http://webfinger.net/rel/profile-page').nil? || data.link('magic-public-key').nil? @@ -37,6 +35,7 @@ class FollowRemoteAccountService < BaseService domain_block = DomainBlock.find_by(domain: domain) + account = Account.new(username: confirmed_username, domain: confirmed_domain) account.remote_url = data.link('http://schemas.google.com/g/2010#updates-from').href account.salmon_url = data.link('salmon').href account.url = data.link('http://webfinger.net/rel/profile-page').href |