Skip to content

Commit

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

Signed-off-by: a1012112796 <[email protected]>
  • Loading branch information
a1012112796 authored Jan 9, 2021
1 parent 7369282 commit d989247
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 d989247

Please sign in to comment.