From 7edc3a3692a45d7f85e560c941637de2f4ff9c6e Mon Sep 17 00:00:00 2001 From: Mathieu Velten Date: Wed, 9 Sep 2020 18:38:50 +0200 Subject: [PATCH] Fix when no email specified --- go.mod | 2 ++ submit.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/go.mod b/go.mod index 0e007e8..c7dbc91 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/matrix-org/rageshake +go 1.14 + require ( cloud.google.com/go v0.0.0-20170406015231-675fad27ef35 github.com/golang/protobuf v0.0.0-20170331031902-2bba0603135d diff --git a/submit.go b/submit.go index 1a2721a..42c7bed 100644 --- a/submit.go +++ b/submit.go @@ -589,6 +589,10 @@ func buildGithubIssueRequest(p parsedPayload, listingURL string) github.IssueReq } func (s *submitServer) sendEmail(p parsedPayload, reportDir string) error { + if len(s.cfg.EmailAddresses) == 0 { + return nil + } + e := email.NewEmail() e.From = "Rageshake "