about summary refs log tree commit diff
path: root/app/services/follow_service.rb
blob: ea868b5442c6196c7e7442f80ccbd7a48ccadfe2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
class FollowService
  def call(source_account, uri)
    target_account = follow_remote_account_service.(uri)
    source_account.follow!(target_account) unless target_account.nil?
  end

  private

  def follow_remote_account_service
    FollowRemoteAccountService.new
  end
end