diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-21 20:50:30 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-21 20:50:30 -0500 |
commit | 084b9504017e519e33007f7aa8cdff7d571f954a (patch) | |
tree | bcefc968d1b5ae0ba40bac9adb2eb8955c3b6a21 /app/controllers | |
parent | bca5a3073f3f6bee2c64f3e199e9e56d0dd7ff7e (diff) |
split `hide public profile` & `hide public ap outbox` into separate user options, make original `Account.hidden` prop federation-affecting `invisible mode`
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/accounts_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/activitypub/outboxes_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/settings/preferences_controller.rb | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 4736b3596..22993934a 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -17,7 +17,7 @@ class AccountsController < ApplicationController @pinned_statuses = [] @endorsed_accounts = @account.endorsed_accounts.to_a.sample(4) - if current_account && @account.blocking?(current_account) + if @account.hidden || (@account&.user && @account.user.hides_public_profile?) || (current_account && @account.blocking?(current_account)) @statuses = [] return end diff --git a/app/controllers/activitypub/outboxes_controller.rb b/app/controllers/activitypub/outboxes_controller.rb index 3e617b10e..00d050dc3 100644 --- a/app/controllers/activitypub/outboxes_controller.rb +++ b/app/controllers/activitypub/outboxes_controller.rb @@ -55,7 +55,7 @@ class ActivityPub::OutboxesController < Api::BaseController def set_statuses return unless page_requested? - if @account&.user && @account.user.hides_public_outbox? + if @account.hidden || @account&.user && @account.user.hides_public_outbox? @statuses = Status.none else @statuses = @account.statuses.permitted_for(@account, signed_request_account) diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index 031075fcd..b9f3a803d 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_profile, :setting_hide_public_outbox, :setting_max_public_history, |