mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-03 17:56:26 +01:00
Use Account#find_remote method when possible
This commit is contained in:
parent
cfba03bd27
commit
38ce960ff9
@ -147,7 +147,7 @@ class ProcessFeedService < BaseService
|
||||
username = xml.at_xpath('./activity:object/xmlns:author/xmlns:name').content
|
||||
url = xml.at_xpath('./activity:object/xmlns:author/xmlns:uri').content
|
||||
domain = Addressable::URI.parse(url).host
|
||||
account = Account.find_by(username: username, domain: domain)
|
||||
account = Account.find_remote(username, domain)
|
||||
|
||||
if account.nil?
|
||||
account = follow_remote_account_service.call("#{username}@#{domain}")
|
||||
|
Loading…
Reference in New Issue
Block a user