Merge upstream (#111)

This commit is contained in:
kibigo!
2017-08-01 13:07:43 -07:00
205 changed files with 1927 additions and 1507 deletions

View File

@@ -18,7 +18,7 @@ class AccountSearchService < BaseService
return [] if query_blank_or_hashtag? || limit < 1
if resolving_non_matching_remote_account?
[ResolveRemoteAccountService.new.call("#{query_username}@#{query_domain}")]
[ResolveRemoteAccountService.new.call("#{query_username}@#{query_domain}")].compact
else
search_results_and_exact_match.compact.uniq.slice(0, limit)
end

View File

@@ -90,7 +90,7 @@ class BatchedRemoveStatusService < BaseService
key = FeedManager.instance.key(:home, follower_id)
originals = statuses.reject(&:reblog?)
reblogs = statuses.reject { |s| !s.reblog? }
reblogs = statuses.select(&:reblog?)
# Quickly remove all originals
redis.pipelined do