OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Ensure the payload sent to notifications is a hash (#9253)
Oliver Günther9547d28e95e2
diff --git a/lib/open_project/notifications.rb b/lib/open_project/notifications.rbindex 60cf6368fd9..7805233e483 100644--- a/lib/open_project/notifications.rb+++ b/lib/open_project/notifications.rb@@ -53,8 +53,8 @@ module OpenProjectendend- sub = ActiveSupport::Notifications.subscribe(name.to_s) do |_, _, _, _, payload|- block.call(payload)+ sub = ActiveSupport::Notifications.subscribe(name.to_s) do |_, _, _, _, data|+ block.call(data.fetch(:payload, data))endsubs = clear_subscriptions ? [] : Array(subscriptions[name])@@ -78,7 +78,7 @@ module OpenProject# delivered (although it is not at the moment), so don't count on object equality# for the payload.def send(name, payload)- ActiveSupport::Notifications.instrument(name.to_s, payload)+ ActiveSupport::Notifications.instrument(name.to_s, payload: payload)enddef subscriptions