1
0
mirror of https://github.com/TwiN/gatus.git synced 2026-03-24 11:10:07 +00:00

fix(alerting): Remove square brackets from email subject (#1586)

* Email alerts: Use parens instead of square brackets in the subject to resolve Gmail threading issues. Fixes #1563

* Remove parens

* Add `:` after alert name
This commit is contained in:
jaydeethree
2026-03-21 18:25:52 -07:00
committed by GitHub
parent 3a6ad14cba
commit b20935ecfe
2 changed files with 7 additions and 7 deletions

View File

@@ -143,10 +143,10 @@ func (provider *AlertProvider) Send(ep *endpoint.Endpoint, alert *alert.Alert, r
func (provider *AlertProvider) buildMessageSubjectAndBody(ep *endpoint.Endpoint, alert *alert.Alert, result *endpoint.Result, resolved bool) (string, string) {
var subject, message string
if resolved {
subject = fmt.Sprintf("[%s] Alert resolved", ep.DisplayName())
subject = fmt.Sprintf("%s: Alert resolved", ep.DisplayName())
message = fmt.Sprintf("An alert for %s has been resolved after passing successfully %d time(s) in a row", ep.DisplayName(), alert.SuccessThreshold)
} else {
subject = fmt.Sprintf("[%s] Alert triggered", ep.DisplayName())
subject = fmt.Sprintf("%s: Alert triggered", ep.DisplayName())
message = fmt.Sprintf("An alert for %s has been triggered due to having failed %d time(s) in a row", ep.DisplayName(), alert.FailureThreshold)
}
var formattedConditionResults string