Fix misleading error when attempting to re-send a pending follow request (#13133)

Fixes #13131
This commit is contained in:
ThibG 2020-02-24 21:19:19 +01:00 committed by GitHub
parent d91946ae13
commit cf4fe6caef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View file

@ -18,14 +18,13 @@ class FollowService < BaseService
if source_account.following?(target_account)
# We're already following this account, but we'll call follow! again to
# make sure the reblogs status is set correctly.
source_account.follow!(target_account, reblogs: reblogs)
return
return source_account.follow!(target_account, reblogs: reblogs)
elsif source_account.requested?(target_account)
# This isn't managed by a method in AccountInteractions, so we modify it
# ourselves if necessary.
req = source_account.follow_requests.find_by(target_account: target_account)
req.update!(show_reblogs: reblogs)
return
return req
end
ActivityTracker.increment('activity:interactions')