mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 06:40:50 +00:00
feat(notifications): register webhook + email channel types
Add WEBHOOK and EMAIL to the channel set, the dispatcher cascade, the per-event default policy, the push-attempt ledger union, and the admin diagnostic config-presence check. Channels are string-typed, so no migration is needed. The dispatcher routes each new type through its sender with the same decrypt + parse + classify path the existing channels use; the cascade orders webhook + email between the self-host relays and the Web Push fallback. Add the webhook + email channel config shapes and their settings-form validation schemas, plus the query-key entries for the two new config reads.
This commit is contained in:
1 parent
d1055b4047
commit
aec41e154f
7 files changed
+146
-4
No files matched your search
@@ -134,6 +134,14 @@ function isChannelConfigPresent(
|
||||
if (type === "NTFY") {
|
||||
return typeof parsed.topic === "string" && parsed.topic.length > 0;
|
||||
}
|
||||
if (type === "WEBHOOK") {
|
||||
return typeof parsed.url === "string" && parsed.url.length > 0;
|
||||
}
|
||||
if (type === "EMAIL") {
|
||||
return (
|
||||
typeof parsed.recipient === "string" && parsed.recipient.length > 0
|
||||
);
|
||||
}
|
||||
return false;
|
||||
} catch {
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user