about summary refs log tree commit diff
path: root/app/views/accounts/_follow_button.html.haml
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2018-04-08 19:05:02 -0500
committerDavid Yip <yipdw@member.fsf.org>2018-04-08 19:05:02 -0500
commit67e77f230e93b2e2ac05632a7cccdb5f26537f3b (patch)
tree6fd9801a67dc1576e5711177fdeeac04f2622098 /app/views/accounts/_follow_button.html.haml
parent695b53b796767e307d8ce0f5d11c2a82cb85bfd5 (diff)
parent0893b1669548858daee79ab1260fb98646a0b3fa (diff)
Merge remote-tracking branch 'origin/master' into gs-master
  Conflicts:
 	app/serializers/initial_state_serializer.rb

The glitch flavour isn't yet pulling custom emoji data on its own (see
https://github.com/tootsuite/mastodon/pull/7047).  Once that gets into
the glitch flavour, we can eliminate the custom_emojis load.
Diffstat (limited to 'app/views/accounts/_follow_button.html.haml')
-rw-r--r--app/views/accounts/_follow_button.html.haml6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/accounts/_follow_button.html.haml b/app/views/accounts/_follow_button.html.haml
index e476e0aff..96ae23234 100644
--- a/app/views/accounts/_follow_button.html.haml
+++ b/app/views/accounts/_follow_button.html.haml
@@ -8,16 +8,16 @@
   - if user_signed_in? && current_account.id != account.id && !requested
     .controls
       - if following
-        = link_to account_unfollow_path(account), data: { method: :post }, class: 'icon-button' do
+        = link_to (account.local? ? account_unfollow_path(account) : remote_unfollow_path(acct: account.acct)), data: { method: :post }, class: 'icon-button' do
           = fa_icon 'user-times'
           = t('accounts.unfollow')
       - else
-        = link_to account_follow_path(account), data: { method: :post }, class: 'icon-button' do
+        = link_to (account.local? ? account_follow_path(account) : authorize_follow_path(acct: account.acct)), data: { method: :post }, class: 'icon-button' do
           = fa_icon 'user-plus'
           = t('accounts.follow')
   - elsif !user_signed_in?
     .controls
       .remote-follow
-        = link_to account_remote_follow_path(account), class: 'icon-button' do
+        = link_to (account.local? ? account_remote_follow_path(account) : "web+mastodon://follow?uri=#{account.uri}"), class: 'icon-button' do
           = fa_icon 'user-plus'
           = t('accounts.remote_follow')