mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Enable assignee e-mail notification (#2003)
* Enable assignee e-mail notification * Check assignee and doer to avoid self made comment notifications. * Assignee not always defined * New method to avoid error when assignee deleted * Assignee empty check
This commit is contained in:
committed by
Lunny Xiao
parent
09cb999145
commit
f2afed3098
@@ -42,6 +42,11 @@ func mailIssueCommentToParticipants(issue *Issue, doer *User, comment *Comment,
|
||||
participants = append(participants, issue.Poster)
|
||||
}
|
||||
|
||||
// Assignee must receive any communications
|
||||
if issue.Assignee != nil && issue.AssigneeID > 0 && issue.AssigneeID != doer.ID {
|
||||
participants = append(participants, issue.Assignee)
|
||||
}
|
||||
|
||||
tos := make([]string, 0, len(watchers)) // List of email addresses.
|
||||
names := make([]string, 0, len(watchers))
|
||||
for i := range watchers {
|
||||
|
Reference in New Issue
Block a user