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

Backport #16011
This commit is contained in:
Jimmy Praet
2021-05-31 02:17:34 -04:00
committed by GitHub
parent 3a79f1190f
commit 8007602b40
3 changed files with 12 additions and 5 deletions
+5 -1
View File
@@ -20,12 +20,16 @@ func mailParticipantsComment(c *models.Comment, opType models.ActionType, issue
for i, u := range mentions {
mentionedIDs[i] = u.ID
}
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,
}, mentionedIDs); err != nil {
log.Error("mailIssueCommentToParticipants: %v", err)