mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 00:00:46 +08:00
Only show deprecation warning if the webhook is active
This commit is contained in:
@ -58,11 +58,11 @@ class WebHook < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.enqueue_object_hooks(type, object, event, serializer = nil)
|
||||
if type == :flag
|
||||
Discourse.deprecate("The flags webhook is deprecated. Please use reviewable instead.")
|
||||
end
|
||||
|
||||
if active_web_hooks(type).exists?
|
||||
if type == :flag
|
||||
Discourse.deprecate("The flags webhook is deprecated. Please use reviewable instead.")
|
||||
end
|
||||
|
||||
payload = WebHook.generate_payload(type, object, serializer)
|
||||
|
||||
WebHook.enqueue_hooks(type, event,
|
||||
|
Reference in New Issue
Block a user