feat: multiple webhooks
This commit is contained in:
1 parent
e757e1b970
commit
1b534c518a
2 files changed
+10
-1
No files matched your search
@@ -79,6 +79,13 @@ function templateWebhookPlayload(payload: any, message: string) {
|
||||
}
|
||||
|
||||
async function webhookNotify(webhook: WebhookConfig, message: string) {
|
||||
if (Array.isArray(webhook)) {
|
||||
for (const w of webhook) {
|
||||
webhookNotify(w, message)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
console.log(
|
||||
'Sending webhook notification: ' + JSON.stringify(message) + ' to webhook ' + webhook.url
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user