mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-18 00:54:49 +01:00
Fix remote status fetching for “pure” ActivityPub WEB_ACCOUNT users (#5372)
Remote ActivityPub users that have never been known as OStatus users (whether or not they support it) will not have a “remote_url” attribute set. In case they reside on an instance with WEB_DOMAIN ≠ LOCAL_DOMAIN, the current check did rely on “remote_url” to verify the user's domain.
This commit is contained in:
parent
3283868e28
commit
95fe20b78a
@ -40,6 +40,6 @@ class FetchRemoteStatusService < BaseService
|
|||||||
end
|
end
|
||||||
|
|
||||||
def confirmed_domain?(domain, account)
|
def confirmed_domain?(domain, account)
|
||||||
account.domain.nil? || domain.casecmp(account.domain).zero? || domain.casecmp(Addressable::URI.parse(account.remote_url).normalized_host).zero?
|
account.domain.nil? || domain.casecmp(account.domain).zero? || domain.casecmp(Addressable::URI.parse(account.remote_url || account.uri).normalized_host).zero?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user