Skip to content
Snippets Groups Projects
Commit 38ce960f authored by Eugen Rochko's avatar Eugen Rochko
Browse files

Use Account#find_remote method when possible

parent cfba03bd
No related branches found
No related tags found
No related merge requests found
......@@ -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}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment