|
|
|
@ -22,8 +22,9 @@ module OpenProject::Webhooks::EventResources |
|
|
|
|
def handle_notification(payload, event_name) |
|
|
|
|
action = payload[:journal].initial? ? "created" : "updated" |
|
|
|
|
event_name = prefixed_event_name(action) |
|
|
|
|
work_package = payload[:journal].journable |
|
|
|
|
active_webhooks.with_event_name(event_name).pluck(:id).each do |id| |
|
|
|
|
WorkPackageWebhookJob.perform_later(id, payload[:journal].id, event_name) |
|
|
|
|
WorkPackageWebhookJob.perform_later(id, work_package, event_name) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|