about summary refs log tree commit diff
path: root/app/services/precompute_feed_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-11 16:47:36 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-11 16:47:36 +0100
commit447cfef62d74a670ddd600c0240f41746ac2fe0a (patch)
tree5c3ed8838f90435b4c4c52a366059cbbd2a24a67 /app/services/precompute_feed_service.rb
parentb919f39b3186c5f022d3965cf6023ff9041e91ca (diff)
Improving feed queries, switching API to doorkeeper authentication
Diffstat (limited to 'app/services/precompute_feed_service.rb')
-rw-r--r--app/services/precompute_feed_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/precompute_feed_service.rb b/app/services/precompute_feed_service.rb
index 89b034404..bcc757222 100644
--- a/app/services/precompute_feed_service.rb
+++ b/app/services/precompute_feed_service.rb
@@ -18,11 +18,11 @@ class PrecomputeFeedService < BaseService
   end
 
   def home(account)
-    Status.where(account: [account] + account.following)
+    Status.where(account: [account] + account.following).with_includes.with_counts
   end
 
   def mentions(account)
-    Status.where(id: Mention.where(account: account).pluck(:status_id))
+    Status.where(id: Mention.where(account: account).pluck(:status_id)).with_includes.with_counts
   end
 
   def key(type, id)