summaryrefslogtreecommitdiffstats
path: root/models/issue_comment.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-11-03 11:23:17 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2017-11-03 17:23:17 +0800
commit240609432b84a8caa5ec4c99a916277952ef02d5 (patch)
tree4ceb81292f531bcdca34389079b8a711643cd4c6 /models/issue_comment.go
parent8798cf4e3ba30bc0bdea073bf273ac27b71b78ce (diff)
downloadgitea-240609432b84a8caa5ec4c99a916277952ef02d5.tar.gz
gitea-240609432b84a8caa5ec4c99a916277952ef02d5.zip
Issue content should not be updated when closing with comment (#2833)
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r--models/issue_comment.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index f2acd5354f..34c0ecdce5 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -272,15 +272,15 @@ func (c *Comment) MailParticipants(e Engine, opType ActionType, issue *Issue) (e
return fmt.Errorf("UpdateIssueMentions [%d]: %v", c.IssueID, err)
}
+ content := c.Content
+
switch opType {
- case ActionCommentIssue:
- issue.Content = c.Content
case ActionCloseIssue:
- issue.Content = fmt.Sprintf("Closed #%d", issue.Index)
+ content = fmt.Sprintf("Closed #%d", issue.Index)
case ActionReopenIssue:
- issue.Content = fmt.Sprintf("Reopened #%d", issue.Index)
+ content = fmt.Sprintf("Reopened #%d", issue.Index)
}
- if err = mailIssueCommentToParticipants(e, issue, c.Poster, c, mentions); err != nil {
+ if err = mailIssueCommentToParticipants(e, issue, c.Poster, content, c, mentions); err != nil {
log.Error(4, "mailIssueCommentToParticipants: %v", err)
}