diff options
author | ThibG <thib@sitedethib.com> | 2020-03-09 00:10:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-09 00:10:29 +0100 |
commit | b154428e14861f5cdc7ba6e5f8e582dbf7d0a1c0 (patch) | |
tree | ce3ebad6225a4bf7ed466251c4c3d46b1c0d3ba6 /app/controllers/api | |
parent | 9660aa4543deff41c60d131e081137f84e771499 (diff) |
Add federation support for the "hide network" preference (#11673)
* Change ActivityPub follower/following collections to not link first page * Add support for hiding followers and following of remote users * Switch to using a single `hide_collections` column * Address code style remarks
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, 2 insertions, 2 deletions
diff --git a/app/controllers/api/v1/accounts/follower_accounts_controller.rb b/app/controllers/api/v1/accounts/follower_accounts_controller.rb index 850702cca..1daa1ed0d 100644 --- a/app/controllers/api/v1/accounts/follower_accounts_controller.rb +++ b/app/controllers/api/v1/accounts/follower_accounts_controller.rb @@ -25,7 +25,7 @@ class Api::V1::Accounts::FollowerAccountsController < Api::BaseController end def hide_results? - (@account.user_hides_network? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) + (@account.hides_followers? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) end def default_accounts diff --git a/app/controllers/api/v1/accounts/following_accounts_controller.rb b/app/controllers/api/v1/accounts/following_accounts_controller.rb index 830dcd8a1..6fc23cf75 100644 --- a/app/controllers/api/v1/accounts/following_accounts_controller.rb +++ b/app/controllers/api/v1/accounts/following_accounts_controller.rb @@ -25,7 +25,7 @@ class Api::V1::Accounts::FollowingAccountsController < Api::BaseController end def hide_results? - (@account.user_hides_network? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) + (@account.hides_following? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) end def default_accounts |