summaryrefslogtreecommitdiffstats
path: root/models/issue_mail.go
diff options
context:
space:
mode:
authorkolaente <konrad@kola-entertainments.de>2018-05-09 18:29:04 +0200
committerLauris BH <lauris@nix.lv>2018-05-09 19:29:04 +0300
commit95f2e2b57beedcdeb2b9623dc86e26f252fdd7bd (patch)
treeebfeb5b898f72fc57ac1fe9680374fdb4bc91aeb /models/issue_mail.go
parent238a997ec0b5d3e3bed0e55edcacebb44f86d373 (diff)
downloadgitea-95f2e2b57beedcdeb2b9623dc86e26f252fdd7bd.tar.gz
gitea-95f2e2b57beedcdeb2b9623dc86e26f252fdd7bd.zip
Multiple assignees (#3705)
Diffstat (limited to 'models/issue_mail.go')
-rw-r--r--models/issue_mail.go13
1 files changed, 10 insertions, 3 deletions
diff --git a/models/issue_mail.go b/models/issue_mail.go
index 08e4eed584..179bb6527b 100644
--- a/models/issue_mail.go
+++ b/models/issue_mail.go
@@ -46,9 +46,16 @@ func mailIssueCommentToParticipants(e Engine, issue *Issue, doer *User, content
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)
+ // Assignees must receive any communications
+ assignees, err := GetAssigneesByIssue(issue)
+ if err != nil {
+ return err
+ }
+
+ for _, assignee := range assignees {
+ if assignee.ID != doer.ID {
+ participants = append(participants, assignee)
+ }
}
tos := make([]string, 0, len(watchers)) // List of email addresses.