Class: NewsmastMastodon::AutoFollowDefaultAccountsService

Inherits:
BaseService
  • Object
show all
Defined in:
app/services/newsmast_mastodon/auto_follow_default_accounts_service.rb

Instance Method Summary collapse

Instance Method Details

#call(source_account) ⇒ Object



7
8
9
10
11
12
13
14
# File 'app/services/newsmast_mastodon/auto_follow_default_accounts_service.rb', line 7

def call()
  return unless .local?

  auto_follow_accounts = ENV['AUTO_FOLLOW_ACCOUNTS'].presence&.split(/\s*,\s*/)&.reject(&:blank?) || []
  auto_follow_accounts.each do |acct|
    (, acct)
  end
end