about summary refs log tree commit diff
path: root/app/controllers/activitypub
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-21 20:21:20 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-21 20:21:20 -0500
commitbca5a3073f3f6bee2c64f3e199e9e56d0dd7ff7e (patch)
tree748dc4ebe2704cedae2d54768927d8f43cd580a1 /app/controllers/activitypub
parentd9073f132b041fae818ae3894503065de123f257 (diff)
privacy - add option to disable public activitypub outbox
Diffstat (limited to 'app/controllers/activitypub')
-rw-r--r--app/controllers/activitypub/outboxes_controller.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/activitypub/outboxes_controller.rb b/app/controllers/activitypub/outboxes_controller.rb
index 438fa226e..3e617b10e 100644
--- a/app/controllers/activitypub/outboxes_controller.rb
+++ b/app/controllers/activitypub/outboxes_controller.rb
@@ -55,8 +55,11 @@ class ActivityPub::OutboxesController < Api::BaseController
 
   def set_statuses
     return unless page_requested?
-
-    @statuses = @account.statuses.permitted_for(@account, signed_request_account)
+    if @account&.user && @account.user.hides_public_outbox?
+      @statuses = Status.none
+    else
+      @statuses = @account.statuses.permitted_for(@account, signed_request_account)
+    end
     @statuses = params[:min_id].present? ? @statuses.paginate_by_min_id(LIMIT, params[:min_id]).reverse : @statuses.paginate_by_max_id(LIMIT, params[:max_id])
     @statuses = cache_collection(@statuses, Status)
   end