mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 05:12:14 +00:00
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:
1 parent
d8a3614120
commit
d029e4e1dc
16 files changed
+336
-32
No files matched your search
@@ -71,8 +71,8 @@ export function NotificationChannelsPanel() {
|
||||
<WebPushCard />
|
||||
</div>
|
||||
)}
|
||||
{/* v1.17.1 — generic outbound webhook (Gotify / Discord / Slack /
|
||||
Matrix / Home Assistant in one channel). */}
|
||||
{/* v1.17.1 — generic outbound webhook (Discord / Slack / Gotify /
|
||||
Home Assistant / n8n in one channel). */}
|
||||
<div id="webhook" className="scroll-mt-28">
|
||||
<WebhookCard isAuthenticated={isAuthenticated} />
|
||||
</div>
|
||||
|
||||
@@ -209,11 +209,11 @@ export function WebhookCard({ isAuthenticated }: { isAuthenticated: boolean }) {
|
||||
{t("settings.webhookFormatGotify")}
|
||||
</option>
|
||||
</NativeSelect>
|
||||
{format === "gotify" && (
|
||||
<p className="text-muted-foreground text-xs">
|
||||
{t("settings.webhookFormatGotifyHint")}
|
||||
</p>
|
||||
)}
|
||||
<p className="text-muted-foreground text-xs">
|
||||
{format === "gotify"
|
||||
? t("settings.webhookFormatGotifyHint")
|
||||
: t("settings.webhookFormatGenericHint")}
|
||||
</p>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="webhook-header-name">
|
||||
|
||||
Reference in new issue
Block a user