about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/activitypub/outboxes_controller.rb7
-rw-r--r--app/controllers/settings/preferences_controller.rb1
2 files changed, 6 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
diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb
index 45bfd24b2..031075fcd 100644
--- a/app/controllers/settings/preferences_controller.rb
+++ b/app/controllers/settings/preferences_controller.rb
@@ -50,6 +50,7 @@ class Settings::PreferencesController < Settings::BaseController
       :setting_user_is_kobold,
       :setting_hide_mascot,
       :setting_hide_interactions,
+      :setting_hide_public_outbox,
       :setting_max_public_history,
 
       :setting_default_privacy,