diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-12-31 00:54:38 +0100 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-20 23:12:03 -0600 |
commit | 90623848734cb2c51b94ca7a82c3477414a86a92 (patch) | |
tree | f201f507711ec007eaf95e86410789c129cb6608 /app/controllers/api/v1 | |
parent | 591117feed5246cf4c96638b3b41ed54dd0c5315 (diff) |
port tootsuite#12716 to monsterfork: Fix error when fetching followers/following from REST API when user has network hidden
Fix #12510
Diffstat (limited to 'app/controllers/api/v1')
-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 a86b5bb51..b34e5326b 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? - !user_signed_in? || (@account.user_hides_network? && current_account.id != @account.id) || (current_account && @account.blocking?(current_account)) + (@account.user_hides_network? && 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 45feababf..18d26c705 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? - !user_signed_in? || (@account.user_hides_network? && current_account.id != @account.id) || (current_account && @account.blocking?(current_account)) + (@account.user_hides_network? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) end def default_accounts |