Parcourir la source

Fix error when fetching followers/following from REST API when user has network hidden (#12716)

Fix #12510
master^2
Eugen Rochko il y a 4 ans
committed by GitHub
Parent
révision
2999c95596
Aucune clé connue n'a été trouvée dans la base pour cette signature ID de la clé GPG: 4AEE18F83AFDEB23
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. +1
    -1
      app/controllers/api/v1/accounts/follower_accounts_controller.rb
  2. +1
    -1
      app/controllers/api/v1/accounts/following_accounts_controller.rb

+ 1
- 1
app/controllers/api/v1/accounts/follower_accounts_controller.rb Voir le fichier

@@ -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


+ 1
- 1
app/controllers/api/v1/accounts/following_accounts_controller.rb Voir le fichier

@@ -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


Chargement…
Annuler
Enregistrer