Improve blocked view of profiles (#10491)
* Revert "Fix filtering of favourited_by, reblogged_by, followers and following (#10447)" This reverts commit120544067f
. * Revert "Hide blocking accounts from blocked users (#10442)" This reverts commit62bafa20a1
. * Improve blocked view of profiles - Change "You are blocked" to "Profile unavailable" - Hide following/followers in API when blocked - Disable follow button and show "Profile unavailable" on public profile as well
This commit is contained in:
@ -3,8 +3,6 @@
|
||||
class Api::V1::Accounts::StatusesController < Api::BaseController
|
||||
before_action -> { authorize_if_got_token! :read, :'read:statuses' }
|
||||
before_action :set_account
|
||||
before_action :check_account_suspension
|
||||
before_action :check_account_block
|
||||
after_action :insert_pagination_headers
|
||||
|
||||
respond_to :json
|
||||
@ -20,14 +18,6 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
|
||||
@account = Account.find(params[:account_id])
|
||||
end
|
||||
|
||||
def check_account_suspension
|
||||
gone if @account.suspended?
|
||||
end
|
||||
|
||||
def check_account_block
|
||||
gone if current_account.present? && @account.blocking?(current_account)
|
||||
end
|
||||
|
||||
def load_statuses
|
||||
cached_account_statuses
|
||||
end
|
||||
|
Reference in New Issue
Block a user