notification_webhook.rb 721 B

123456789101112131415161718
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Ticket::PerformChanges::Action::NotificationWebhook < Ticket::PerformChanges::Action
  3. def self.phase
  4. :after_save
  5. end
  6. def execute(...)
  7. TriggerWebhookJob.perform_later(performable,
  8. record,
  9. article,
  10. changes: record.human_changes(context_data.try(:dig, :changes), record),
  11. user_id: context_data.try(:dig, :user_id),
  12. execution_type: origin,
  13. event_type: context_data.try(:dig, :type))
  14. end
  15. end