diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-04-27 23:31:25 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:22 -0500 |
commit | 1ab60fea4831855657e666db6ef00ec7efe0f970 (patch) | |
tree | 16b53036d1ddb955e254e75ff2ca1b4532c5ee53 /app/controllers/api/v1 | |
parent | ed9c8f67c4ea7985e2a29e65e352694b9d52ecdc (diff) |
Split boosts/repeats off to their own tab and add to the API.
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r-- | app/controllers/api/v1/accounts/statuses_controller.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/api/v1/accounts/statuses_controller.rb b/app/controllers/api/v1/accounts/statuses_controller.rb index 8cd8f8e79..8a216ce0d 100644 --- a/app/controllers/api/v1/accounts/statuses_controller.rb +++ b/app/controllers/api/v1/accounts/statuses_controller.rb @@ -28,14 +28,14 @@ class Api::V1::Accounts::StatusesController < Api::BaseController def account_statuses statuses = truthy_param?(:pinned) ? pinned_scope : permitted_account_statuses - statuses = statuses.paginate_by_id(limit_param(DEFAULT_STATUSES_LIMIT), params_slice(:max_id, :since_id, :min_id)) - statuses.merge!(only_media_scope) if truthy_param?(:only_media) - statuses.merge!(no_replies_scope) if truthy_param?(:exclude_replies) - statuses.merge!(no_reblogs_scope) if truthy_param?(:exclude_reblogs) - statuses.merge!(hashtag_scope) if params[:tagged].present? + statuses = statuses.without_replies if !@account.replies || truthy_param?(:exclude_replies) + statuses = statuses.without_reblogs if truthy_param?(:exclude_reblogs) + statuses = statuses.reblogs if truthy_param?(:reblogs) && !truthy_param?(:exclude_reblogs) + statuses = statuses.where(id: account_media_status_ids) if truthy_param?(:only_media) + statuses = statuses.hashtag_scope if params[:tagged].present? - statuses + statuses.paginate_by_id(limit_param(DEFAULT_STATUSES_LIMIT), params_slice(:max_id, :since_id, :min_id)) end def permitted_account_statuses |