From b17b2f25acc4d0cd4284835f28364451cb2fcd88 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 5 Jan 2019 11:27:58 +0100 Subject: [PATCH] Follow new account before unfollowing the old one during move (#9719) --- app/workers/unfollow_follow_worker.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/workers/unfollow_follow_worker.rb b/app/workers/unfollow_follow_worker.rb index a2133bb8cf..50d3bf034a 100644 --- a/app/workers/unfollow_follow_worker.rb +++ b/app/workers/unfollow_follow_worker.rb @@ -10,9 +10,9 @@ class UnfollowFollowWorker old_target_account = Account.find(old_target_account_id) new_target_account = Account.find(new_target_account_id) - UnfollowService.new.call(follower_account, old_target_account) FollowService.new.call(follower_account, new_target_account) - rescue ActiveRecord::RecordNotFound + UnfollowService.new.call(follower_account, old_target_account) + rescue ActiveRecord::RecordNotFound, Mastodon::NotPermittedError true end end