From b81b6ad1c271ecfbdf5706cf68e8f9e2dce5e65b Mon Sep 17 00:00:00 2001 From: Fosco Marotto Date: Fri, 20 Nov 2020 21:30:03 -0800 Subject: [PATCH] [Lists] Add a 10 day limit to list query --- app/controllers/api/v1/timelines/list_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/api/v1/timelines/list_controller.rb b/app/controllers/api/v1/timelines/list_controller.rb index fb5250f3..1447817f 100644 --- a/app/controllers/api/v1/timelines/list_controller.rb +++ b/app/controllers/api/v1/timelines/list_controller.rb @@ -32,6 +32,8 @@ class Api::V1::Timelines::ListController < Api::BaseController def list_statuses statuses = Status.where( account: @accounts, reply: false + ).where( + 'updated_at > ?', 10.days.ago ).paginate_by_id( limit_param(DEFAULT_STATUSES_LIMIT), params_slice(:max_id, :since_id, :min_id)