1
Fork 0

Add email headers (#15939)

* Added additional email headers.

* Added tests.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
KN4CK3R 2021-05-22 08:47:16 +02:00 committed by GitHub
parent be745be0a4
commit 77fa7146c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 104 additions and 61 deletions

View file

@ -116,7 +116,7 @@ func mailIssueCommentBatch(ctx *mailCommentContext, users []*models.User, visite
checkUnit = models.UnitTypePullRequests
}
langMap := make(map[string][]string)
langMap := make(map[string][]*models.User)
for _, user := range users {
// At this point we exclude:
// user that don't have all mails enabled or users only get mail on mention and this is one ...
@ -138,7 +138,7 @@ func mailIssueCommentBatch(ctx *mailCommentContext, users []*models.User, visite
continue
}
langMap[user.Language] = append(langMap[user.Language], user.Email)
langMap[user.Language] = append(langMap[user.Language], user)
}
for lang, receivers := range langMap {