Minor: Moved the debug log to the correct location. (#38639)
This commit is contained in:
parent
a896081808
commit
3b39562954
@ -33,14 +33,12 @@ class ActivityPub::FetchRemoteActorService < BaseService
|
|||||||
|
|
||||||
# FEP-2c59 defines a `webfinger` attribute that makes things more explicit and spares an extra request in some cases.
|
# FEP-2c59 defines a `webfinger` attribute that makes things more explicit and spares an extra request in some cases.
|
||||||
# It supersedes `preferredUsername`.
|
# It supersedes `preferredUsername`.
|
||||||
if @json['webfinger'].present? && @json['webfinger'].is_a?(String)
|
@username, @domain = split_acct(@json['webfinger']) if @json['webfinger'].present? && @json['webfinger'].is_a?(String)
|
||||||
@username, @domain = split_acct(@json['webfinger'])
|
|
||||||
Rails.logger.debug { "Actor #{uri} has an invalid `webfinger` value, falling back to `preferredUsername`" }
|
|
||||||
end
|
|
||||||
|
|
||||||
if @username.blank? || @domain.blank?
|
if @username.blank? || @domain.blank?
|
||||||
raise "Actor #{uri} has no `preferredUsername`, and either a bogus or missing `webfinger`, which is a requirement for Mastodon compatibility" if @json['preferredUsername'].blank?
|
raise "Actor #{uri} has no `preferredUsername`, and either a bogus or missing `webfinger`, which is a requirement for Mastodon compatibility" if @json['preferredUsername'].blank?
|
||||||
|
|
||||||
|
Rails.logger.debug { "Actor #{uri} has an invalid `webfinger` value, falling back to `preferredUsername`" } if @json['webfinger'].present?
|
||||||
@username = @json['preferredUsername']
|
@username = @json['preferredUsername']
|
||||||
@domain = Addressable::URI.parse(@uri).normalized_host
|
@domain = Addressable::URI.parse(@uri).normalized_host
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user