diff --git a/docs/how-tos/receive-notification.md b/docs/how-tos/receive-notification.md index f17ed9f..fac6a5c 100644 --- a/docs/how-tos/receive-notification.md +++ b/docs/how-tos/receive-notification.md @@ -74,10 +74,10 @@ networks: The title and body of the notifications can be tailored to your needs using Go templates. Template sources must be mounted inside the container in /config/templates: -- email.template: Email notification template -- telegram.template: Telegram notification template -- email-error.template: Error notification template -- telegram-error.template: Error notification template +- email.tmpl: Email notification template +- telegram.tmpl: Telegram notification template +- email-error.tmpl: Error notification template +- telegram-error.tmpl: Error notification template ### Data diff --git a/templates/email-error.template b/templates/email-error.tmpl similarity index 100% rename from templates/email-error.template rename to templates/email-error.tmpl diff --git a/templates/email.template b/templates/email.tmpl similarity index 100% rename from templates/email.template rename to templates/email.tmpl diff --git a/templates/telegram-error.template b/templates/telegram-error.tmpl similarity index 100% rename from templates/telegram-error.template rename to templates/telegram-error.tmpl diff --git a/templates/telegram.template b/templates/telegram.tmpl similarity index 100% rename from templates/telegram.template rename to templates/telegram.tmpl diff --git a/utils/notification.go b/utils/notification.go index 864f621..108c337 100644 --- a/utils/notification.go +++ b/utils/notification.go @@ -99,7 +99,7 @@ func NotifySuccess(notificationData *NotificationData) { //Email notification err := CheckEnvVars(mailVars) if err == nil { - body, err := parseTemplate(*notificationData, "email.template") + body, err := parseTemplate(*notificationData, "email.tmpl") if err != nil { Error("Could not parse email template: %v", err) } @@ -111,7 +111,7 @@ func NotifySuccess(notificationData *NotificationData) { //Telegram notification err = CheckEnvVars(vars) if err == nil { - message, err := parseTemplate(*notificationData, "telegram.template") + message, err := parseTemplate(*notificationData, "telegram.tmpl") if err != nil { Error("Could not parse telegram template: %v", err) } @@ -143,7 +143,7 @@ func NotifyError(error string) { Error: error, EndTime: time.Now().Format(TimeFormat()), BackupReference: os.Getenv("BACKUP_REFERENCE"), - }, "email-error.template") + }, "email-error.tmpl") if err != nil { Error("Could not parse error template: %v", err) } @@ -159,7 +159,7 @@ func NotifyError(error string) { Error: error, EndTime: time.Now().Format(TimeFormat()), BackupReference: os.Getenv("BACKUP_REFERENCE"), - }, "telegram-error.template") + }, "telegram-error.tmpl") if err != nil { Error("Could not parse error template: %v", err)