Víctor Cuadrado Juan
7 years ago
No known key found for this signature in database
GPG Key ID: 223F15CA5AAF0E78
1 changed files with
5 additions and
6 deletions
-
src/github.com/matrix-org/go-neb/services/alertmanager/alertmanager.go
|
|
|
@ -126,12 +126,11 @@ func (s *Service) Register(oldService types.Service, client *gomatrix.Client) er |
|
|
|
// validate that we have at least a plain text template
|
|
|
|
if templates.TextTemplate == "" { |
|
|
|
return fmt.Errorf("plain text template missing") |
|
|
|
} else { |
|
|
|
// validate the plain text template is valid
|
|
|
|
_, err := text.New("textTemplate").Parse(templates.TextTemplate) |
|
|
|
if err != nil { |
|
|
|
return fmt.Errorf("plain text template is invalid") |
|
|
|
} |
|
|
|
} |
|
|
|
// validate the plain text template is valid
|
|
|
|
_, err := text.New("textTemplate").Parse(templates.TextTemplate) |
|
|
|
if err != nil { |
|
|
|
return fmt.Errorf("plain text template is invalid") |
|
|
|
} |
|
|
|
if templates.HTMLTemplate != "" { |
|
|
|
// validate that the html template is valid
|
|
|
|
|