A platform for community discussion. Free, open, simple.
DEV: call 'enqueue_hooks' method only if active webhooks exist
Vinoth Kannan76696b22fe18
diff --git a/lib/post_destroyer.rb b/lib/post_destroyer.rbindex 9509a965644..cf36b72d6f9 100644--- a/lib/post_destroyer.rb+++ b/lib/post_destroyer.rb@@ -65,7 +65,7 @@ class PostDestroyerid: @post.id,category_id: @post&.topic&.category_id,payload: payload- )+ ) if WebHook.active_web_hooks(:post).exists?if @post.is_first_post? && @post.topicDiscourseEvent.trigger(:topic_destroyed, @post.topic, @user)@@ -73,7 +73,7 @@ class PostDestroyerid: topic.id,category_id: topic&.category_id,payload: topic_payload- )+ ) if WebHook.active_web_hooks(:topic).exists?endend