From 8536521a72c703f81c39f0c1c74467130f5d2dec Mon Sep 17 00:00:00 2001 From: Bianca Nenciu Date: Wed, 20 Jan 2021 10:51:31 +0200 Subject: [PATCH] DEV: Add DiscourseEvent before post changes are published (#11759) This can be used to add to the message notifying the client about the update. --- lib/post_revisor.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/post_revisor.rb b/lib/post_revisor.rb index 46797a76da1..76e2c4b28e6 100644 --- a/lib/post_revisor.rb +++ b/lib/post_revisor.rb @@ -634,6 +634,8 @@ class PostRevisor {} end + DiscourseEvent.trigger(:before_post_publish_changes, post_changes, @topic_changes, options) + @post.publish_change_to_clients!(:revised, options) end