package templates import ( "bytes" "html/template" "github.com/warmbly/warmbly/internal/observability/errs" ) // Generic transactional notification used by the in-app notification // service for any category routed to email (new sign-in, reply alerts, // and so on). Title/body are plain text, auto-escaped by html/template. // CTAURL is optional: an empty value drops the button entirely. const notificationContent = `
Notification
{{.Body}}
{{if .CTAURL}}| {{.CTALabel}} |
You're receiving this because email notifications are on for this activity. Manage them in your notification settings.
` var notificationTmpl = template.Must(template.New("notification_content").Parse(notificationContent)) // GenerateNotificationHTML renders a generic notification email. ctaURL // is optional (empty drops the button); ctaLabel defaults to "Open in //