diff options
author | a1012112796 <1012112796@qq.com> | 2021-01-10 01:34:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-09 17:34:08 +0000 |
commit | d989247bb08d2b8eb144e7a0edeaedfc26d08175 (patch) | |
tree | 94a13cd584136dd55430e8e3e726d2273bad835e /services/mailer | |
parent | 736928286be3e0b0847bacd72720ff4332ac0073 (diff) | |
download | gitea-d989247bb08d2b8eb144e7a0edeaedfc26d08175.tar.gz gitea-d989247bb08d2b8eb144e7a0edeaedfc26d08175.zip |
fix mailIssueCommentBatch for pull request (#14252)
fix #14250
Signed-off-by: a1012112796 <1012112796@qq.com>
Diffstat (limited to 'services/mailer')
-rw-r--r-- | services/mailer/mail_issue.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/services/mailer/mail_issue.go b/services/mailer/mail_issue.go index ffe2a4e471..b600060a67 100644 --- a/services/mailer/mail_issue.go +++ b/services/mailer/mail_issue.go @@ -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++ } |