mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Various fixes for issue mail notifications (#7165)
- Send individual mails for actions and comments - Send mail for new issues/prs without a comment - Use correct sender for reopen/close actions - Hopefully fixed all bugs related to missing mails Fixes: https://github.com/go-gitea/gitea/issues/7124 Fixes: https://github.com/go-gitea/gitea/issues/5977
This commit is contained in:
@@ -42,7 +42,7 @@ func (m *mailNotifier) NotifyCreateIssueComment(doer *models.User, repo *models.
|
||||
}
|
||||
|
||||
func (m *mailNotifier) NotifyNewIssue(issue *models.Issue) {
|
||||
if err := issue.MailParticipants(models.ActionCreateIssue); err != nil {
|
||||
if err := issue.MailParticipants(issue.Poster, models.ActionCreateIssue); err != nil {
|
||||
log.Error("MailParticipants: %v", err)
|
||||
}
|
||||
}
|
||||
@@ -63,13 +63,13 @@ func (m *mailNotifier) NotifyIssueChangeStatus(doer *models.User, issue *models.
|
||||
}
|
||||
}
|
||||
|
||||
if err := issue.MailParticipants(actionType); err != nil {
|
||||
if err := issue.MailParticipants(doer, actionType); err != nil {
|
||||
log.Error("MailParticipants: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func (m *mailNotifier) NotifyNewPullRequest(pr *models.PullRequest) {
|
||||
if err := pr.Issue.MailParticipants(models.ActionCreatePullRequest); err != nil {
|
||||
if err := pr.Issue.MailParticipants(pr.Issue.Poster, models.ActionCreatePullRequest); err != nil {
|
||||
log.Error("MailParticipants: %v", err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user