Skip to content

Commit

Permalink
fix mailIssueCommentBatch for pull request (#14252) (#14296)
Browse files Browse the repository at this point in the history
fix #14250

Signed-off-by: a1012112796 <[email protected]>
  • Loading branch information
a1012112796 authored Jan 11, 2021
1 parent fb656b5 commit bf853db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/mailer/mail_issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,14 @@ func mailIssueCommentBatch(ctx *mailCommentContext, ids []int64, visited map[int
return err
}

checkUnit := models.UnitTypeIssues
if ctx.Issue.IsPull {
checkUnit = models.UnitTypePullRequests
}
// Make sure all recipients can still see the issue
idx := 0
for _, r := range recipients {
if ctx.Issue.Repo.CheckUnitUser(r, models.UnitTypeIssues) {
if ctx.Issue.Repo.CheckUnitUser(r, checkUnit) {
recipients[idx] = r
idx++
}
Expand Down

0 comments on commit bf853db

Please sign in to comment.