fix(notifications): send content and text so Discord and Slack webhooks deliver

The generic webhook body carried title, message, eventType and priority
only. Discord refuses a body without content (400, code 50006 "Cannot
send an empty message") and a Slack incoming webhook one without text,
so the test button and every reminder failed against the targets the
settings card names.

The generic body now appends content (cut to Discord's 2000 characters)
and text, both the masked title and message on two lines, plus
allowed_mentions with an empty parse list so Discord resolves no
mentions. The four original fields keep their values and order for
Home Assistant and n8n rules. The Gotify body is unchanged. The card
names what works and shows a hint for the generic format.
This commit is contained in:
Marc-André Bombeck committed 2026-10-09 13:43:28 +02:00
1 parent d8a3614120
commit d029e4e1dc
16 files changed
+336 -32

No files matched your search

+4 -3
View File
@@ -29670,9 +29670,10 @@ components:
- type: string
const: ""
format:
description: Body shape. `generic` sends HealthLog's own JSON envelope; `gotify` sends the body Gotify's `POST /message`
expects, with an integer priority. Omitted keeps the stored choice, which is `generic` for a config saved
before the choice existed.
description: Body shape. `generic` sends HealthLog's own JSON envelope (`title`, `message`, `eventType`, `priority`,
plus `content` and `text` so a Discord or Slack webhook URL accepts it as is); `gotify` sends the body
Gotify's `POST /message` expects, with an integer priority. Omitted keeps the stored choice, which is
`generic` for a config saved before the choice existed.
type: string
enum:
- generic