-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
notification: use application name in messaging #1881
Conversation
notification/email/sender.go
Outdated
@@ -50,19 +53,19 @@ func (s *Sender) Send(ctx context.Context, msg notification.Message) (*notificat | |||
var subject string | |||
switch m := msg.(type) { | |||
case notification.Test: | |||
subject = "GoAlert: Test Message" | |||
subject = "Test Message" | |||
e.Body.Title = "Test Message" | |||
e.Body.Intros = []string{"This is a test message from GoAlert."} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e.Body.Intros = []string{"This is a test message from GoAlert."} | |
e.Body.Intros = []string{"This is a test message from " + cfg.ApplicationName() + "."} |
Should these be substituted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. maybe it should just be This is a test message.
since the from is already defined elsewhere with the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're already setting the product name too; so it's redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either works for me! I don't find it overly redundant.
Description:
This PR continues the work from #1803 and uses the application name in notification providers.