From 5aa3df017bcdefd15e041ca0a7e428f85887aff2 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 22 Mar 2017 17:36:34 +0100 Subject: Fix full-text search query quotation, improve tag search performance with an index, add ability to open status by URL from search (fix #53) --- app/services/fetch_remote_status_service.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'app/services/fetch_remote_status_service.rb') diff --git a/app/services/fetch_remote_status_service.rb b/app/services/fetch_remote_status_service.rb index 7063231e4..e2d185723 100644 --- a/app/services/fetch_remote_status_service.rb +++ b/app/services/fetch_remote_status_service.rb @@ -1,8 +1,13 @@ # frozen_string_literal: true class FetchRemoteStatusService < BaseService - def call(url) - atom_url, body = FetchAtomService.new.call(url) + def call(url, prefetched_body = nil) + if prefetched_body.nil? + atom_url, body = FetchAtomService.new.call(url) + else + atom_url = url + body = prefetched_body + end return nil if atom_url.nil? process_atom(atom_url, body) -- cgit