diff options
Diffstat (limited to 'app/controllers/api/v1/timelines/direct_controller.rb')
-rw-r--r-- | app/controllers/api/v1/timelines/direct_controller.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/app/controllers/api/v1/timelines/direct_controller.rb b/app/controllers/api/v1/timelines/direct_controller.rb index 61c12ebf7..d8a76d153 100644 --- a/app/controllers/api/v1/timelines/direct_controller.rb +++ b/app/controllers/api/v1/timelines/direct_controller.rb @@ -9,7 +9,6 @@ class Api::V1::Timelines::DirectController < Api::BaseController def show @statuses = load_statuses - preload_media render json: @statuses, each_serializer: REST::StatusSerializer, relationships: StatusRelationshipsPresenter.new(@statuses, current_user&.account_id) end @@ -61,9 +60,4 @@ class Api::V1::Timelines::DirectController < Api::BaseController def pagination_since_id @statuses.first.id end - - def preload_media - fetch_ids = @statuses.flat_map { |s| s.media_attachments.select { |m| m.needs_redownload? }.pluck(:id) }.uniq - fetch_ids.each { |m| FetchMediaWorker.perform_async(m) } - end end |