diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-05-18 02:26:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-18 02:26:51 +0200 |
commit | 1e02dc871533de78174b48a6a527f11b0f2bc7ec (patch) | |
tree | 85342796b125279d75c6591ef8b9090a11b8b404 /app/controllers/api | |
parent | 919eef309820a421d6f5886b8ae811d3924cea97 (diff) |
Add preference to hide following/followers lists (#7532)
* Add preference to hide following/followers lists - Public pages - ActivityPub collections (does not return pages but does give total) - REST API (unless it's your own) (does not federate) Fix #6901 * Add preference * Add delegation * Fix issue * Fix issue
Diffstat (limited to 'app/controllers/api')
-rw-r--r-- | app/controllers/api/v1/accounts/follower_accounts_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/api/v1/accounts/following_accounts_controller.rb | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/api/v1/accounts/follower_accounts_controller.rb b/app/controllers/api/v1/accounts/follower_accounts_controller.rb index c4f600c54..4578cf6ca 100644 --- a/app/controllers/api/v1/accounts/follower_accounts_controller.rb +++ b/app/controllers/api/v1/accounts/follower_accounts_controller.rb @@ -19,6 +19,8 @@ class Api::V1::Accounts::FollowerAccountsController < Api::BaseController end def load_accounts + return [] if @account.user_hides_network? && current_account.id != @account.id + default_accounts.merge(paginated_follows).to_a end diff --git a/app/controllers/api/v1/accounts/following_accounts_controller.rb b/app/controllers/api/v1/accounts/following_accounts_controller.rb index 90b1f7fc5..ce2bbda85 100644 --- a/app/controllers/api/v1/accounts/following_accounts_controller.rb +++ b/app/controllers/api/v1/accounts/following_accounts_controller.rb @@ -19,6 +19,8 @@ class Api::V1::Accounts::FollowingAccountsController < Api::BaseController end def load_accounts + return [] if @account.user_hides_network? && current_account.id != @account.id + default_accounts.merge(paginated_follows).to_a end |