diff options
author | pluralcafe-docker <git@plural.cafe> | 2019-01-12 04:24:14 +0000 |
---|---|---|
committer | pluralcafe-docker <git@plural.cafe> | 2019-01-12 04:24:14 +0000 |
commit | ae24ef877b82466cab026a76ea6ed8598ddaae18 (patch) | |
tree | 584c25ada377f2e6da49a9b45b3da947501b1831 /app/services/activitypub/fetch_remote_account_service.rb | |
parent | fa1ab7fbe4166f3d8b481891dcc443df5aa212bb (diff) | |
parent | 2cfa55185a5fc7d93a160a4e9a4730aae6725b0f (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/services/activitypub/fetch_remote_account_service.rb')
-rw-r--r-- | app/services/activitypub/fetch_remote_account_service.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/activitypub/fetch_remote_account_service.rb b/app/services/activitypub/fetch_remote_account_service.rb index 8430d12d5..3c2044941 100644 --- a/app/services/activitypub/fetch_remote_account_service.rb +++ b/app/services/activitypub/fetch_remote_account_service.rb @@ -5,8 +5,8 @@ class ActivityPub::FetchRemoteAccountService < BaseService SUPPORTED_TYPES = %w(Application Group Organization Person Service).freeze - # Does a WebFinger roundtrip on each call - def call(uri, id: true, prefetched_body: nil, break_on_redirect: false) + # Does a WebFinger roundtrip on each call, unless `only_key` is true + def call(uri, id: true, prefetched_body: nil, break_on_redirect: false, only_key: false) return ActivityPub::TagManager.instance.uri_to_resource(uri, Account) if ActivityPub::TagManager.instance.local_uri?(uri) @json = if prefetched_body.nil? @@ -21,9 +21,9 @@ class ActivityPub::FetchRemoteAccountService < BaseService @username = @json['preferredUsername'] @domain = Addressable::URI.parse(@uri).normalized_host - return unless verified_webfinger? + return unless only_key || verified_webfinger? - ActivityPub::ProcessAccountService.new.call(@username, @domain, @json) + ActivityPub::ProcessAccountService.new.call(@username, @domain, @json, only_key: only_key) rescue Oj::ParseError nil end |