mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 05:12:41 +01:00
fix mailIssueCommentBatch for pull request (#14252)
fix #14250 Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
parent
736928286b
commit
d989247bb0
1 changed files with 5 additions and 1 deletions
|
@ -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++
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue