diff options
author | nicolas <nclm@users.noreply.github.com> | 2016-11-23 15:43:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-23 15:43:27 +0100 |
commit | 23677bc51e657522049fb904e626f81f577de515 (patch) | |
tree | dc9417c57a3af3036d621940a751e9adf1b09ce3 /app/services | |
parent | 1e95fbb10b81ea0eedcb39a83e52f42e3dbb456c (diff) | |
parent | 82191b33831f26e071a27dd59ce2e46fb467589c (diff) |
Merge branch 'master' into french-translation
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/notify_service.rb | 2 | ||||
-rw-r--r-- | app/services/process_feed_service.rb | 2 | ||||
-rw-r--r-- | app/services/search_service.rb | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index c0f1d4c53..772adfb90 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -10,6 +10,8 @@ class NotifyService < BaseService create_notification send_email if email_enabled? + rescue ActiveRecord::RecordInvalid + return end private diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index 8daafd444..1cd801b80 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -61,7 +61,7 @@ class ProcessFeedService < BaseService status.save! - NotifyService.new.call(status.reblog.account, status) if status.reblog? + NotifyService.new.call(status.reblog.account, status) if status.reblog? && status.reblog.account.local? Rails.logger.debug "Queuing remote status #{status.id} (#{id}) for distribution" DistributionWorker.perform_async(status.id) status diff --git a/app/services/search_service.rb b/app/services/search_service.rb index c4cffda13..598c7d02c 100644 --- a/app/services/search_service.rb +++ b/app/services/search_service.rb @@ -12,7 +12,7 @@ class SearchService < BaseService Account.search_for("#{username} #{domain}") end - results = results.limit(limit).with_counters + results = results.limit(limit) if resolve && results.empty? && !domain.nil? results = [FollowRemoteAccountService.new.call("#{username}@#{domain}")] |