summaryrefslogtreecommitdiffstats
path: root/services/mailer/mail_issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/mailer/mail_issue.go')
-rw-r--r--services/mailer/mail_issue.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/mailer/mail_issue.go b/services/mailer/mail_issue.go
index 9786a06f62..bb541d27a0 100644
--- a/services/mailer/mail_issue.go
+++ b/services/mailer/mail_issue.go
@@ -146,7 +146,11 @@ func mailIssueCommentBatch(ctx *mailCommentContext, users []*models.User, visite
// working backwards from the last (possibly) incomplete batch. If len(receivers) can be 0 this
// starting condition will need to be changed slightly
for i := ((len(receivers) - 1) / MailBatchSize) * MailBatchSize; i >= 0; i -= MailBatchSize {
- SendAsyncs(composeIssueCommentMessages(ctx, lang, receivers[i:], fromMention, "issue comments"))
+ msgs, err := composeIssueCommentMessages(ctx, lang, receivers[i:], fromMention, "issue comments")
+ if err != nil {
+ return err
+ }
+ SendAsyncs(msgs)
receivers = receivers[:i]
}
}