mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 12:42:49 +00:00
06cdaa577a
A Telegram webhook passed Test while every real alert was rejected with "message text is empty" (#2540). The Test path always overlaid the service template's headers, but real deliveries sent the stored header copy that the UI seeded at creation. An edit can leave that copy blank, masked or replaced. Telegram reads arguments from a body only when it is labelled as JSON or form data, and checks text before chat_id, so a JSON body without a JSON Content-Type produces exactly that error. When a built-in service renders its own body (no custom template), the template's static headers describe that body. Apply them on every real firing and recovery through prepareWebhookDeliveryContext, replace stored values under any spelling of the name, and route the Test path through the same helper so Test predicts real delivery. Custom templates and generic webhooks keep their stored headers.