about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-10 00:03:33 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-10 00:03:33 +0100
commit17903c6dae9eb38ac221fb7cf86e5e3cafe465d0 (patch)
tree4f1d32a1ec9b770407a919bcc46794fcc09f339b /app/controllers/api
parentc5e03a2e0d7eac132a5d62d1d7d523a6969697cc (diff)
Improve filtering of public/hashtag timelines, both in backlog and real-time
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/accounts_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb
index f2049cd55..5cc0817f6 100644
--- a/app/controllers/api/v1/accounts_controller.rb
+++ b/app/controllers/api/v1/accounts_controller.rb
@@ -16,7 +16,7 @@ class Api::V1::AccountsController < ApiController
 
   def following
     results   = Follow.where(account: @account).paginate_by_max_id(DEFAULT_ACCOUNTS_LIMIT, params[:max_id], params[:since_id])
-    @accounts = Account.where(id: results.map(&:account_id)).with_counters.to_a
+    @accounts = Account.where(id: results.map(&:target_account_id)).with_counters.to_a
 
     next_path = following_api_v1_account_url(max_id: results.last.id)    if results.size == DEFAULT_ACCOUNTS_LIMIT
     prev_path = following_api_v1_account_url(since_id: results.first.id) if results.size > 0