diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/services/follow_service.rb | 5 | ||||
-rw-r--r-- | app/views/authorize_interactions/show.html.haml | 6 |
2 files changed, 8 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') diff --git a/app/views/authorize_interactions/show.html.haml b/app/views/authorize_interactions/show.html.haml index 7ca9b98c1..42c874134 100644 --- a/app/views/authorize_interactions/show.html.haml +++ b/app/views/authorize_interactions/show.html.haml @@ -11,6 +11,12 @@ = 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 = hidden_field_tag :action, :follow |