TEmplate dir

This commit is contained in:
binwiederhier
2025-07-16 13:49:15 +02:00
parent 93e14b73bb
commit b1e935da45
7 changed files with 142 additions and 65 deletions

View File

@@ -7,7 +7,6 @@ import (
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
)
@@ -246,6 +245,24 @@ func (q *queryFilter) Pass(msg *message) bool {
return true
}
type templateMode string
func (t templateMode) Enabled() bool {
return t != ""
}
func (t templateMode) Name() string {
if isBoolValue(string(t)) {
return ""
}
return string(t)
}
type templateFile struct {
Title *string `yaml:"title"`
Message *string `yaml:"message"`
}
type apiHealthResponse struct {
Healthy bool `json:"healthy"`
}