mirror of
https://github.com/go-gitea/gitea
synced 2025-07-29 05:38:37 +00:00
Backport #16011
This commit is contained in:
@@ -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)
|
||||
|
@@ -158,12 +158,18 @@ func mailParticipants(issue *models.Issue, doer *models.User, opType models.Acti
|
||||
for i, u := range mentions {
|
||||
mentionedIDs[i] = u.ID
|
||||
}
|
||||
content := issue.Content
|
||||
if opType == models.ActionCloseIssue || opType == models.ActionClosePullRequest ||
|
||||
opType == models.ActionReopenIssue || opType == models.ActionReopenPullRequest ||
|
||||
opType == models.ActionMergePullRequest {
|
||||
content = ""
|
||||
}
|
||||
if err = mailIssueCommentToParticipants(
|
||||
&mailCommentContext{
|
||||
Issue: issue,
|
||||
Doer: doer,
|
||||
ActionType: opType,
|
||||
Content: issue.Content,
|
||||
Content: content,
|
||||
Comment: nil,
|
||||
}, mentionedIDs); err != nil {
|
||||
log.Error("mailIssueCommentToParticipants: %v", err)
|
||||
|
Reference in New Issue
Block a user