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 <1012112796@qq.com>
  • Loading branch information
a1012112796 committed 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
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.