diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-02-24 06:32:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-24 06:32:13 +0100 |
commit | 5f4c0b79c25486548b44f1bc5d65e7527a4843c4 (patch) | |
tree | 376e4de10619b73b47ddc36a76a17e13bb52637b /app/services/resolve_account_service.rb | |
parent | eb83ab45e26811dc9ddc07db68559bd36f33deb5 (diff) |
Change ResolveAccountService's handling of skip_webfinger (#15750)
* Change ResolveAccountService's handling of skip_webfinger Change it so it never makes any webfinger query, as the name would imply. * Add tests * Change FollowService to not take an URI for target_account * Restore domain-block check in FollowService * Fix tests
Diffstat (limited to 'app/services/resolve_account_service.rb')
-rw-r--r-- | app/services/resolve_account_service.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/services/resolve_account_service.rb b/app/services/resolve_account_service.rb index 3301aaf51..b8ddeb2ad 100644 --- a/app/services/resolve_account_service.rb +++ b/app/services/resolve_account_service.rb @@ -10,7 +10,7 @@ class ResolveAccountService < BaseService # @param [String, Account] uri URI in the username@domain format or account record # @param [Hash] options # @option options [Boolean] :redirected Do not follow further Webfinger redirects - # @option options [Boolean] :skip_webfinger Do not attempt to refresh account data + # @option options [Boolean] :skip_webfinger Do not attempt any webfinger query or refreshing account data # @return [Account] def call(uri, options = {}) return if uri.blank? @@ -120,8 +120,9 @@ class ResolveAccountService < BaseService def webfinger_update_due? return false if @options[:check_delivery_availability] && !DeliveryFailureTracker.available?(@domain) + return false if @options[:skip_webfinger] - @account.nil? || ((!@options[:skip_webfinger] || @account.ostatus?) && @account.possibly_stale?) + @account.nil? || (@account.ostatus? && @account.possibly_stale?) end def activitypub_ready? |