feat: multiple webhooks

This commit is contained in:
lyc8503 committed 2025-11-04 23:53:10 +08:00
1 parent e757e1b970
commit 1b534c518a
2 files changed
+10 -1

No files matched your search

+7
View File
@@ -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
)