diff options
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/account_search_service.rb | 10 | ||||
-rw-r--r-- | app/services/process_feed_service.rb | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/app/services/account_search_service.rb b/app/services/account_search_service.rb index e695d22ca..04b2ed958 100644 --- a/app/services/account_search_service.rb +++ b/app/services/account_search_service.rb @@ -63,10 +63,12 @@ class AccountSearchService < BaseService end def search_results - @_search_results ||= if account - advanced_search_results - else - simple_search_results + @_search_results ||= begin + if account + advanced_search_results + else + simple_search_results + end end end diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index 799a9f6e3..7a27b7b29 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -205,7 +205,7 @@ class ProcessFeedService < BaseService media = MediaAttachment.where(status: parent, remote_url: link['href']).first_or_initialize(account: parent.account, status: parent, remote_url: link['href']) parsed_url = Addressable::URI.parse(link['href']).normalize - next if !%w[http https].include?(parsed_url.scheme) || parsed_url.host.empty? + next if !%w(http https).include?(parsed_url.scheme) || parsed_url.host.empty? media.save |