1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Don't manipulate input params in email notification (#16011)

This commit is contained in:
Jimmy Praet
2021-05-30 11:38:38 +02:00
committed by GitHub
parent d8c99c64d5
commit d79c8bc302
3 changed files with 12 additions and 6 deletions

View File

@@ -11,12 +11,16 @@ import (
// MailParticipantsComment sends new comment emails to repository watchers and mentioned people.
func MailParticipantsComment(c *models.Comment, opType models.ActionType, issue *models.Issue, mentions []*models.User) error {
content := c.Content
if c.Type == models.CommentTypePullPush {
content = ""
}
if err := mailIssueCommentToParticipants(
&mailCommentContext{
Issue: issue,
Doer: c.Poster,
ActionType: opType,
Content: c.Content,
Content: content,
Comment: c,
}, mentions); err != nil {
log.Error("mailIssueCommentToParticipants: %v", err)