mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-16 06:52:54 +00:00
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
This commit is contained in:
parent
134e3fdf3d
commit
b39fab41c8
5 changed files with 39 additions and 20 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue