Fix #5708: Reject->Follow will remove the follow if it exists (#6571)

lolsob-rspec
Eugen Rochko 2018-02-28 06:55:06 +01:00 committed by GitHub
parent 0ebd2a1718
commit 5f70533e8a
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,8 @@ class ActivityPub::Activity::Reject < ActivityPub::Activity
follow_request = FollowRequest.find_by(account: target_account, target_account: @account) follow_request = FollowRequest.find_by(account: target_account, target_account: @account)
follow_request&.reject! follow_request&.reject!
UnfollowService.new.call(target_account, @account) if target_account.following?(@account)
end end
def target_uri def target_uri