mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Add modifier for webhook event header generation (#27054)
This commit is contained in:
committed by
GitHub
parent
a388f41dd4
commit
9264479c27
@@ -45,7 +45,15 @@ module Jobs
|
||||
web_hook_body = build_webhook_body
|
||||
web_hook_event = create_webhook_event(web_hook_body)
|
||||
uri = URI(@web_hook.payload_url.strip)
|
||||
|
||||
web_hook_headers = build_webhook_headers(uri, web_hook_body, web_hook_event)
|
||||
web_hook_headers =
|
||||
DiscoursePluginRegistry.apply_modifier(
|
||||
:web_hook_event_headers,
|
||||
web_hook_headers,
|
||||
web_hook_body,
|
||||
web_hook_event,
|
||||
)
|
||||
|
||||
emitter = WebHookEmitter.new(@web_hook, web_hook_event)
|
||||
web_hook_response = emitter.emit!(headers: web_hook_headers, body: web_hook_body)
|
||||
|
||||
Reference in New Issue
Block a user