diff options
author | ThibG <thib@sitedethib.com> | 2020-11-12 22:57:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-12 22:57:57 +0100 |
commit | 3b6e27978d5d8851845c5c15bbe8162b998f59d3 (patch) | |
tree | a543d3e1de1f4f87607e7bd99630433dc0160e59 /app/controllers | |
parent | 67125534bc0fd48a45d6cb17a5c78712d8e87150 (diff) | |
parent | 3f09d4ca034bc51b66b86bae7a10a41f02a4964f (diff) |
Merge pull request #1457 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/relationships_controller.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/relationships_controller.rb b/app/controllers/relationships_controller.rb index f1ab980c8..d40770726 100644 --- a/app/controllers/relationships_controller.rb +++ b/app/controllers/relationships_controller.rb @@ -6,6 +6,7 @@ class RelationshipsController < ApplicationController before_action :authenticate_user! before_action :set_accounts, only: :show before_action :set_pack + before_action :set_relationships, only: :show before_action :set_body_classes helper_method :following_relationship?, :followed_by_relationship?, :mutual_relationship? @@ -29,6 +30,10 @@ class RelationshipsController < ApplicationController @accounts = RelationshipFilter.new(current_account, filter_params).results.page(params[:page]).per(40) end + def set_relationships + @relationships = AccountRelationshipsPresenter.new(@accounts.pluck(:id), current_user.account_id) + end + def form_account_batch_params params.require(:form_account_batch).permit(:action, account_ids: []) end @@ -50,7 +55,9 @@ class RelationshipsController < ApplicationController end def action_from_button - if params[:unfollow] + if params[:follow] + 'follow' + elsif params[:unfollow] 'unfollow' elsif params[:remove_from_followers] 'remove_from_followers' |