diff options
author | Lauris BH <lauris@nix.lv> | 2017-11-03 11:23:17 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-11-03 17:23:17 +0800 |
commit | 240609432b84a8caa5ec4c99a916277952ef02d5 (patch) | |
tree | 4ceb81292f531bcdca34389079b8a711643cd4c6 /models/issue_mail.go | |
parent | 8798cf4e3ba30bc0bdea073bf273ac27b71b78ce (diff) | |
download | gitea-240609432b84a8caa5ec4c99a916277952ef02d5.tar.gz gitea-240609432b84a8caa5ec4c99a916277952ef02d5.zip |
Issue content should not be updated when closing with comment (#2833)
Diffstat (limited to 'models/issue_mail.go')
-rw-r--r-- | models/issue_mail.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/issue_mail.go b/models/issue_mail.go index e4a1a40e6d..08e4eed584 100644 --- a/models/issue_mail.go +++ b/models/issue_mail.go @@ -22,7 +22,7 @@ func (issue *Issue) mailSubject() string { // This function sends two list of emails: // 1. Repository watchers and users who are participated in comments. // 2. Users who are not in 1. but get mentioned in current issue/comment. -func mailIssueCommentToParticipants(e Engine, issue *Issue, doer *User, comment *Comment, mentions []string) error { +func mailIssueCommentToParticipants(e Engine, issue *Issue, doer *User, content string, comment *Comment, mentions []string) error { if !setting.Service.EnableNotifyMail { return nil } @@ -80,7 +80,7 @@ func mailIssueCommentToParticipants(e Engine, issue *Issue, doer *User, comment names = append(names, participants[i].Name) } - SendIssueCommentMail(issue, doer, comment, tos) + SendIssueCommentMail(issue, doer, content, comment, tos) // Mail mentioned people and exclude watchers. names = append(names, doer.Name) @@ -92,7 +92,7 @@ func mailIssueCommentToParticipants(e Engine, issue *Issue, doer *User, comment tos = append(tos, mentions[i]) } - SendIssueMentionMail(issue, doer, comment, getUserEmailsByNames(e, tos)) + SendIssueMentionMail(issue, doer, content, comment, getUserEmailsByNames(e, tos)) return nil } @@ -109,7 +109,7 @@ func (issue *Issue) mailParticipants(e Engine) (err error) { return fmt.Errorf("UpdateIssueMentions [%d]: %v", issue.ID, err) } - if err = mailIssueCommentToParticipants(e, issue, issue.Poster, nil, mentions); err != nil { + if err = mailIssueCommentToParticipants(e, issue, issue.Poster, issue.Content, nil, mentions); err != nil { log.Error(4, "mailIssueCommentToParticipants: %v", err) } |