Class: NewsmastMastodon::AutoFollowDefaultAccountsService
- Inherits:
-
BaseService
- Object
- BaseService
- NewsmastMastodon::AutoFollowDefaultAccountsService
- 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(source_account) return unless source_account.local? auto_follow_accounts = ENV['AUTO_FOLLOW_ACCOUNTS'].presence&.split(/\s*,\s*/)&.reject(&:blank?) || [] auto_follow_accounts.each do |acct| follow_account(source_account, acct) end end |