From: Eugen Rochko Date: Wed, 28 Feb 2018 05:55:06 +0000 (+0100) Subject: Fix #5708: Reject->Follow will remove the follow if it exists (#6571) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=e85287284611f7de431d9c51353125c265ebfe3f;p=mastodon.git Fix #5708: Reject->Follow will remove the follow if it exists (#6571) --- diff --git a/app/lib/activitypub/activity/reject.rb b/app/lib/activitypub/activity/reject.rb index d815feeb6..28d472883 100644 --- a/app/lib/activitypub/activity/reject.rb +++ b/app/lib/activitypub/activity/reject.rb @@ -17,6 +17,8 @@ class ActivityPub::Activity::Reject < ActivityPub::Activity follow_request = FollowRequest.find_by(account: target_account, target_account: @account) follow_request&.reject! + + UnfollowService.new.call(target_account, @account) if target_account.following?(@account) end def target_uri