mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
DEV: call 'enqueue_hooks' method only if active webhooks exist
This commit is contained in:
parent
27e7f2bee0
commit
76696b22fe
@ -65,7 +65,7 @@ class PostDestroyer
|
||||
id: @post.id,
|
||||
category_id: @post&.topic&.category_id,
|
||||
payload: payload
|
||||
)
|
||||
) if WebHook.active_web_hooks(:post).exists?
|
||||
|
||||
if @post.is_first_post? && @post.topic
|
||||
DiscourseEvent.trigger(:topic_destroyed, @post.topic, @user)
|
||||
@ -73,7 +73,7 @@ class PostDestroyer
|
||||
id: topic.id,
|
||||
category_id: topic&.category_id,
|
||||
payload: topic_payload
|
||||
)
|
||||
) if WebHook.active_web_hooks(:topic).exists?
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user