Chore: Fix various spelling errors in back-end code (#25241)
* Chore: Fix various spelling errors in back-end code Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com> Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>>
This commit is contained in:
@@ -20,7 +20,7 @@ type Message struct {
|
||||
Body string
|
||||
Info string
|
||||
ReplyTo []string
|
||||
EmbededFiles []string
|
||||
EmbeddedFiles []string
|
||||
AttachedFiles []*AttachedFile
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ func (ns *NotificationService) setFiles(
|
||||
m *gomail.Message,
|
||||
msg *Message,
|
||||
) {
|
||||
for _, file := range msg.EmbededFiles {
|
||||
for _, file := range msg.EmbeddedFiles {
|
||||
m.Embed(file)
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ func (ns *NotificationService) buildEmailMessage(cmd *models.SendEmailCommand) (
|
||||
From: fmt.Sprintf("%s <%s>", ns.Cfg.Smtp.FromName, ns.Cfg.Smtp.FromAddress),
|
||||
Subject: subject,
|
||||
Body: buffer.String(),
|
||||
EmbededFiles: cmd.EmbededFiles,
|
||||
EmbeddedFiles: cmd.EmbeddedFiles,
|
||||
AttachedFiles: buildAttachedFiles(cmd.AttachedFiles),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -119,13 +119,13 @@ func subjectTemplateFunc(obj map[string]interface{}, value string) string {
|
||||
|
||||
func (ns *NotificationService) sendEmailCommandHandlerSync(ctx context.Context, cmd *models.SendEmailCommandSync) error {
|
||||
message, err := ns.buildEmailMessage(&models.SendEmailCommand{
|
||||
Data: cmd.Data,
|
||||
Info: cmd.Info,
|
||||
Template: cmd.Template,
|
||||
To: cmd.To,
|
||||
SingleEmail: cmd.SingleEmail,
|
||||
EmbededFiles: cmd.EmbededFiles,
|
||||
Subject: cmd.Subject,
|
||||
Data: cmd.Data,
|
||||
Info: cmd.Info,
|
||||
Template: cmd.Template,
|
||||
To: cmd.To,
|
||||
SingleEmail: cmd.SingleEmail,
|
||||
EmbeddedFiles: cmd.EmbeddedFiles,
|
||||
Subject: cmd.Subject,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -30,9 +30,9 @@ func TestEmailIntegrationTest(t *testing.T) {
|
||||
cmd := &models.SendEmailCommand{
|
||||
|
||||
Data: map[string]interface{}{
|
||||
"Title": "[CRITICAL] Imaginary timeserie alert",
|
||||
"Title": "[CRITICAL] Imaginary timeseries alert",
|
||||
"State": "Firing",
|
||||
"Name": "Imaginary timeserie alert",
|
||||
"Name": "Imaginary timeseries alert",
|
||||
"Severity": "ok",
|
||||
"SeverityColor": "#D63232",
|
||||
"Message": "Alert message that will support markdown in some distant future.",
|
||||
|
||||
Reference in New Issue
Block a user