about summary refs log tree commit diff
path: root/app/services/process_command_tags_service.rb
blob: 2d81806730d7440e5073778bac60cac75469150a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
# frozen_string_literal: true

class ProcessCommandTagsService < BaseService
  def call(account, status, raise_if_no_output: true)
    CommandTag::Processor.new(account, status).process!
    raise Mastodon::LengthValidationError, 'Processed command tags yielded no output.' if raise_if_no_output && status.destroyed?

    status
  end
end