Use Account#find_remote method when possible

th-downstream
Eugen Rochko 8 years ago
parent 3d229e3937
commit 80217fd58b

@ -147,7 +147,7 @@ class ProcessFeedService < BaseService
username = xml.at_xpath('./activity:object/xmlns:author/xmlns:name').content username = xml.at_xpath('./activity:object/xmlns:author/xmlns:name').content
url = xml.at_xpath('./activity:object/xmlns:author/xmlns:uri').content url = xml.at_xpath('./activity:object/xmlns:author/xmlns:uri').content
domain = Addressable::URI.parse(url).host domain = Addressable::URI.parse(url).host
account = Account.find_by(username: username, domain: domain) account = Account.find_remote(username, domain)
if account.nil? if account.nil?
account = follow_remote_account_service.call("#{username}@#{domain}") account = follow_remote_account_service.call("#{username}@#{domain}")

Loading…
Cancel
Save