Skip to content

Commit

Permalink
Correctly reflect that follow requests weren't auto-accepted when loc…
Browse files Browse the repository at this point in the history
…al account is silenced
  • Loading branch information
ClearlyClaire committed Sep 27, 2019
1 parent a0c7312 commit 62d76a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/api/v1/accounts_controller.rb
Expand Up @@ -33,7 +33,7 @@ def create
def follow
FollowService.new.call(current_user.account, @account, reblogs: truthy_param?(:reblogs))

options = @account.locked? ? {} : { following_map: { @account.id => { reblogs: truthy_param?(:reblogs) } }, requested_map: { @account.id => false } }
options = @account.locked? || current_user.account.silenced? ? {} : { following_map: { @account.id => { reblogs: truthy_param?(:reblogs) } }, requested_map: { @account.id => false } }

render json: @account, serializer: REST::RelationshipSerializer, relationships: relationships(options)
end
Expand Down

0 comments on commit 62d76a4

Please sign in to comment.