From 38ce960ff91b63044073cfe26bf79dbc360842d6 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 10 Oct 2016 17:30:49 +0200 Subject: [PATCH] Use Account#find_remote method when possible --- app/services/process_feed_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index 5b5800f16e..537c1a8ffe 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -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}")