about summary refs log tree commit diff
path: root/app/services/process_command_tags_service.rb
blob: 6b6d466627566db8871e583e4808780c6b5a7799 (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, 'Text commands were processed successfully.' if raise_if_no_output && status.destroyed?

    status
  end
end