diff options
author | mrsdizzie <info@mrsdizzie.com> | 2020-01-03 12:13:22 -0500 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2020-01-03 19:13:22 +0200 |
commit | b39fab41c8b315ba7ddf9f9a4cc522385cf9f720 (patch) | |
tree | 19dc394a4b47c9a2306d4ee45d2524164c6e778e /modules/notification/mail | |
parent | 134e3fdf3d271f1015d062c74d55e3f28f7825d6 (diff) | |
download | gitea-b39fab41c8b315ba7ddf9f9a4cc522385cf9f720.tar.gz gitea-b39fab41c8b315ba7ddf9f9a4cc522385cf9f720.zip |
Some more e-mail notification fixes (#9596)
* Some more e-mail notification fixes
A few more small e-mail notification fixes/changes
* Style footer of notification email to be smaller
* Include text for when pull request is merged
* Don't include original body of issue or PR when merging/closing by
setting issue.Content to "" in these cases
* Set Re: prefix and meessage-ID headers based on actName instead of checking for a
comment. This fixes a bug where certain actions that didn't have a
comment were setting Message-ID instead of In-Reply-To which caused some
mail programs not to show those messages as they would have had the same
Message-ID as a previous message. Also fixes the case where a final
comment and closing message would have been displayed out of order if
you didn't have a copy of the original issue/pr cretion message.
* Update other template footers for consistency
Diffstat (limited to 'modules/notification/mail')
-rw-r--r-- | modules/notification/mail/mail.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/notification/mail/mail.go b/modules/notification/mail/mail.go index 5148434dca..6cc6fda14b 100644 --- a/modules/notification/mail/mail.go +++ b/modules/notification/mail/mail.go @@ -53,6 +53,7 @@ func (m *mailNotifier) NotifyNewIssue(issue *models.Issue) { func (m *mailNotifier) NotifyIssueChangeStatus(doer *models.User, issue *models.Issue, actionComment *models.Comment, isClosed bool) { var actionType models.ActionType + issue.Content = "" if issue.IsPull { if isClosed { actionType = models.ActionClosePullRequest @@ -105,7 +106,7 @@ func (m *mailNotifier) NotifyMergePullRequest(pr *models.PullRequest, doer *mode log.Error("pr.LoadIssue: %v", err) return } - + pr.Issue.Content = "" if err := mailer.MailParticipants(pr.Issue, doer, models.ActionMergePullRequest); err != nil { log.Error("MailParticipants: %v", err) } |