2017-09-10 08:58:38 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class BootstrapTimelineService < BaseService
|
|
|
|
def call(source_account)
|
2018-06-15 17:00:23 +01:00
|
|
|
@source_account = source_account
|
|
|
|
|
|
|
|
autofollow_inviter!
|
2017-09-10 08:58:38 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2018-06-15 17:00:23 +01:00
|
|
|
def autofollow_inviter!
|
|
|
|
return unless @source_account&.user&.invite&.autofollow?
|
2017-09-10 08:58:38 +01:00
|
|
|
|
2021-04-24 16:01:43 +01:00
|
|
|
FollowService.new.call(@source_account, @source_account.user.invite.user.account)
|
2017-09-10 08:58:38 +01:00
|
|
|
end
|
|
|
|
end
|