feat(notify): own webhook as a full notification channel
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m59s

The custom webhook could be entered but never switched on since the
notification matrix replaced the old alarm channels. It is now a third
column next to e-mail and Discord for every event and the daily summary;
bundles go out as JSON (event "digest").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sandrodachandClaude Opus 5.5 committed 2026-10-30 19:02:46 +01:00
1 parent 6c154af251
commit 261579f0f2
10 files changed
+202 -56

No files matched your search

+6
View File
@@ -157,13 +157,18 @@ type NotificationEvents struct {
type ChannelChoice struct {
Email bool `json:"email"`
Discord bool `json:"discord"`
Webhook bool `json:"webhook"` // own webhook (customWebhookUrl), JSON payload
}
// Any reports whether at least one channel is chosen.
func (c ChannelChoice) Any() bool { return c.Email || c.Discord || c.Webhook }
type DailySummary struct {
Enabled bool `json:"enabled"`
Time string `json:"time"` // HH:MM, server time zone
Email bool `json:"email"`
Discord bool `json:"discord"`
Webhook bool `json:"webhook"`
}
// DefaultNotificationSettings for users who never saved any; task alarms follow the old alarm channels.
@@ -172,6 +177,7 @@ func DefaultNotificationSettings(alarmChannels []string) NotificationSettings {
for _, c := range alarmChannels {
due.Email = due.Email || c == "email"
due.Discord = due.Discord || c == "discord"
due.Webhook = due.Webhook || c == "webhook"
}
return NotificationSettings{
Events: NotificationEvents{