article.rb 876 B

123456789101112131415161718192021222324252627282930313233
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class TriggerWebhookJob::CustomPayload::Track::Ticket::Article < TriggerWebhookJob::CustomPayload::Track
  3. def self.root?
  4. true
  5. end
  6. def self.klass
  7. 'Ticket::Article'
  8. end
  9. def self.functions
  10. super + %w[
  11. created_by
  12. updated_by
  13. type
  14. sender
  15. origin_by
  16. ].freeze
  17. end
  18. def self.replacements(pre_defined_webhook_type:)
  19. user_functions = TriggerWebhookJob::CustomPayload::Track::User.functions
  20. {
  21. article: functions,
  22. 'article.sender': TriggerWebhookJob::CustomPayload::Track::Ticket::Article::Sender.functions,
  23. 'article.type': TriggerWebhookJob::CustomPayload::Track::Ticket::Article::Type.functions,
  24. 'article.created_by': user_functions,
  25. 'article.updated_by': user_functions,
  26. }
  27. end
  28. end