diff options
Diffstat (limited to 'app/controllers/api/v1/timelines/public_controller.rb')
-rw-r--r-- | app/controllers/api/v1/timelines/public_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/api/v1/timelines/public_controller.rb b/app/controllers/api/v1/timelines/public_controller.rb index 26d877b00..52b5cb323 100644 --- a/app/controllers/api/v1/timelines/public_controller.rb +++ b/app/controllers/api/v1/timelines/public_controller.rb @@ -31,6 +31,8 @@ class Api::V1::Timelines::PublicController < Api::BaseController def public_statuses statuses = public_timeline_statuses + statuses = statuses.not_local_only unless truthy_param?(:local) || truthy_param?(:allow_local_only) + if truthy_param?(:only_media) statuses.joins(:media_attachments).group(:id) else @@ -47,7 +49,7 @@ class Api::V1::Timelines::PublicController < Api::BaseController end def pagination_params(core_params) - params.slice(:local, :remote, :limit, :only_media).permit(:local, :remote, :limit, :only_media).merge(core_params) + params.slice(:local, :remote, :limit, :only_media, :allow_local_only).permit(:local, :remote, :limit, :only_media, :allow_local_only).merge(core_params) end def next_path |