diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-12-31 00:54:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-31 00:54:38 +0100 |
commit | 2999c955968c8d8a6b4a35d13f9b4e7f6769b014 (patch) | |
tree | d9cfded9ac97049b752a4050973915a2aacc35b5 /app/controllers/api/v1/accounts | |
parent | f86ee4b59f25727d248609e0afe277a4f69f6be7 (diff) |
Fix error when fetching followers/following from REST API when user has network hidden (#12716)
Fix #12510
Diffstat (limited to 'app/controllers/api/v1/accounts')
-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 2dabb8398..950e9acf0 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.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 44e89804b..b1433af5e 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.user_hides_network? && current_account&.id != @account.id) || (current_account && @account.blocking?(current_account)) end def default_accounts |