diff options
Diffstat (limited to 'app/controllers/activitypub/outboxes_controller.rb')
-rw-r--r-- | app/controllers/activitypub/outboxes_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/activitypub/outboxes_controller.rb b/app/controllers/activitypub/outboxes_controller.rb index e25a4bc07..4d4f5e364 100644 --- a/app/controllers/activitypub/outboxes_controller.rb +++ b/app/controllers/activitypub/outboxes_controller.rb @@ -49,7 +49,7 @@ class ActivityPub::OutboxesController < ActivityPub::BaseController def set_statuses return unless page_requested? - @statuses = @account.statuses.permitted_for(@account, signed_request_account) + @statuses = @account.statuses.permitted_for(@account, signed_request_account, user_signed_in: known_visitor?) @statuses = @statuses.paginate_by_id(LIMIT, params_slice(:max_id, :min_id, :since_id)) @statuses = cache_collection(@statuses, Status) end @@ -61,4 +61,8 @@ class ActivityPub::OutboxesController < ActivityPub::BaseController def page_params { page: true, max_id: params[:max_id], min_id: params[:min_id] }.compact end + + def known_visitor? + user_signed_in? || (signed_request_account.present? && signed_request_account.following?(@account)) + end end |