about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-02-24 21:19:19 +0100
committerGitHub <noreply@github.com>2020-02-24 21:19:19 +0100
commitcf4fe6caefc45e18c82d619933a9b5f662503aa4 (patch)
treeaa5eb68e40fe5d2838a606644fd44168b2bd00d2 /app/services
parentd91946ae134f84889f26a08987cb75abeab62742 (diff)
Fix misleading error when attempting to re-send a pending follow request (#13133)
Fixes #13131
Diffstat (limited to 'app/services')
-rw-r--r--app/services/follow_service.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/services/follow_service.rb b/app/services/follow_service.rb
index dc47804c0..4d19002c4 100644
--- a/app/services/follow_service.rb
+++ b/app/services/follow_service.rb
@@ -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')