This commit is contained in:
parent
4c3dd0b254
commit
9b994c4aee
3 changed files with 24 additions and 7 deletions
|
@ -14,6 +14,16 @@ class Api::V1::AccountsController < Api::BaseController
|
|||
|
||||
def follow
|
||||
FollowService.new.call(current_user.account, @account.acct)
|
||||
|
||||
unless @account.locked?
|
||||
relationships = AccountRelationshipsPresenter.new(
|
||||
[@account.id],
|
||||
current_user.account_id,
|
||||
following_map: { @account.id => true },
|
||||
requested_map: { @account.id => false }
|
||||
)
|
||||
end
|
||||
|
||||
render json: @account, serializer: REST::RelationshipSerializer, relationships: relationships
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue