Skip to content

Commit bf853db

Browse files
authored
fix mailIssueCommentBatch for pull request (#14252) (#14296)
fix #14250 Signed-off-by: a1012112796 <1012112796@qq.com>
1 parent fb656b5 commit bf853db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

services/mailer/mail_issue.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,14 @@ func mailIssueCommentBatch(ctx *mailCommentContext, ids []int64, visited map[int
123123
return err
124124
}
125125

126+
checkUnit := models.UnitTypeIssues
127+
if ctx.Issue.IsPull {
128+
checkUnit = models.UnitTypePullRequests
129+
}
126130
// Make sure all recipients can still see the issue
127131
idx := 0
128132
for _, r := range recipients {
129-
if ctx.Issue.Repo.CheckUnitUser(r, models.UnitTypeIssues) {
133+
if ctx.Issue.Repo.CheckUnitUser(r, checkUnit) {
130134
recipients[idx] = r
131135
idx++
132136
}

0 commit comments

Comments
 (0)