diff --git a/common/message/main.go b/common/message/main.go index 5ce82a64..eea0f956 100644 --- a/common/message/main.go +++ b/common/message/main.go @@ -12,6 +12,16 @@ const ( ) func Notify(by string, title string, description string, content string) error { + if by == ByAll { + if err := SendEmail(title, config.RootUserEmail, content); err != nil { + return fmt.Errorf("failed to send email: %v", err) + } + if err := SendMessage(title, description, content); err != nil { + return fmt.Errorf("failed to send message: %v", err) + } + return nil + } + if by == ByEmail { return SendEmail(title, config.RootUserEmail, content) }