From f993853db3e233f05a55de5ba2a87b77acf041aa Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 23 Jul 2026 17:49:18 +0200 Subject: Record asset deltas at publish, with changed assets as participants --- lib/tasks/node_actions.rake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/tasks') diff --git a/lib/tasks/node_actions.rake b/lib/tasks/node_actions.rake index c378db24..645315b5 100644 --- a/lib/tasks/node_actions.rake +++ b/lib/tasks/node_actions.rake @@ -13,6 +13,7 @@ namespace :node_actions do stale = NodeAction.where.not(:inferred_from => nil) stale = stale.where(:node_id => ENV["NODE_ID"]) if ENV["NODE_ID"] puts "Removing #{stale.count} previously inferred entries" + ActionParticipant.where(:node_action => stale).delete_all stale.delete_all witnessed_creates = NodeAction.where(:action => "create", :inferred_from => nil).pluck(:node_id).to_set @@ -43,6 +44,7 @@ namespace :node_actions do diff = NodeAction.head_diff(previous, page) NodeAction.record!( :node => node, :page => page, :user => page.editor, + :participants => [node] + NodeAction.changed_assets(previous, page), :action => "publish", :occurred_at => page.updated_at, :inferred_from => "from_page_revision", -- cgit v1.3