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')
%strong
= t('authorize_follow.already_following')
+ = render 'post_follow_actions'
+ - elsif current_account.requested?(@resource)
+ .flash-message
+ %strong
+ = t('authorize_follow.already_requested')
+
= render 'post_follow_actions'
- else
= form_tag authorize_interaction_path, method: :post, class: 'simple_form' do
trouble_logging_in: Trouble logging in?
authorize_follow:
already_following: You are already following this account
+ already_requested: You have already sent a follow request to that account
error: Unfortunately, there was an error looking up the remote account
follow: Follow
follow_request: 'You have sent a follow request to:'