diff options
author | silverwind <me@silverwind.io> | 2019-06-11 21:27:38 +0200 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-06-11 20:27:38 +0100 |
commit | 499a8a1cdd815cc25554371598140f5fb01e216f (patch) | |
tree | 8ad6b181036488f3054cb4326aed84c93a0d5d37 /modules/notification | |
parent | 74690f64514424ac643a8007828de1a785705793 (diff) | |
download | gitea-499a8a1cdd815cc25554371598140f5fb01e216f.tar.gz gitea-499a8a1cdd815cc25554371598140f5fb01e216f.zip |
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
Diffstat (limited to 'modules/notification')
-rw-r--r-- | modules/notification/mail/mail.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/notification/mail/mail.go b/modules/notification/mail/mail.go index 9689f4d4ab..9d0db4f415 100644 --- a/modules/notification/mail/mail.go +++ b/modules/notification/mail/mail.go @@ -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) } } |