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:
parent
74690f6451
commit
499a8a1cdd
3 changed files with 42 additions and 20 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue