Use a redis-cached feed for the DM timeline
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user