Follow new account before unfollowing the old one during move (#9719)

lolsob-rspec
Eugen Rochko 2019-01-05 11:27:58 +01:00 committed by GitHub
parent ef6de324c4
commit e7591340b0
1 changed files with 2 additions and 2 deletions

View File

@ -10,9 +10,9 @@ class UnfollowFollowWorker
old_target_account = Account.find(old_target_account_id) old_target_account = Account.find(old_target_account_id)
new_target_account = Account.find(new_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) 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 true
end end
end end