Add follow selected followers button (#15148)
* Add follow selected followers button * Fix unused variable * Fix i18n normalize
This commit is contained in:
parent
4790a126be
commit
2b1a6e734f
4 changed files with 14 additions and 1 deletions
|
@ -9,6 +9,8 @@ class Form::AccountBatch
|
|||
|
||||
def save
|
||||
case action
|
||||
when 'follow'
|
||||
follow!
|
||||
when 'unfollow'
|
||||
unfollow!
|
||||
when 'remove_from_followers'
|
||||
|
@ -24,6 +26,12 @@ class Form::AccountBatch
|
|||
|
||||
private
|
||||
|
||||
def follow!
|
||||
accounts.find_each do |target_account|
|
||||
FollowService.new.call(current_account, target_account)
|
||||
end
|
||||
end
|
||||
|
||||
def unfollow!
|
||||
accounts.find_each do |target_account|
|
||||
UnfollowService.new.call(current_account, target_account)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue