diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-06-25 22:56:32 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2019-06-27 16:44:12 +0200 |
commit | ca17bae904783dfb1f4899a533d28a79da0c6fe9 (patch) | |
tree | c38565923e7b92c2125452daf35fecf76588f81d /app/controllers | |
parent | 2f95adc06fbfae22e8f9b4df212938108f5e295c (diff) |
Use a redis-cached feed for the DM timeline
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/api/v1/timelines/direct_controller.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/controllers/api/v1/timelines/direct_controller.rb b/app/controllers/api/v1/timelines/direct_controller.rb index d8a76d153..6e98e9cac 100644 --- a/app/controllers/api/v1/timelines/direct_controller.rb +++ b/app/controllers/api/v1/timelines/direct_controller.rb @@ -27,16 +27,18 @@ class Api::V1::Timelines::DirectController < Api::BaseController end def direct_timeline_statuses - # this query requires built in pagination. - Status.as_direct_timeline( - current_account, + account_direct_feed.get( limit_param(DEFAULT_STATUSES_LIMIT), params[:max_id], params[:since_id], - true # returns array of cache_ids object + params[:min_id] ) end + def account_direct_feed + DirectFeed.new(current_account) + end + def insert_pagination_headers set_pagination_headers(next_path, prev_path) end |