aboutsummaryrefslogtreecommitdiffstats
path: root/services/mailer
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-10 03:57:58 +0800
committerGitHub <noreply@github.com>2021-11-09 20:57:58 +0100
commit99b2858e628d92bba252be72def409af77af735b (patch)
tree56159cf10b271307911e6f01626c0c3efba789ab /services/mailer
parentb6b1e716654fec3b16d245ef65cf42e57e1bb5b6 (diff)
downloadgitea-99b2858e628d92bba252be72def409af77af735b.tar.gz
gitea-99b2858e628d92bba252be72def409af77af735b.zip
Move unit into models/unit/ (#17576)
* Move unit into models/unit/ * Rename unit.UnitType as unit.Type
Diffstat (limited to 'services/mailer')
-rw-r--r--services/mailer/mail_issue.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/mailer/mail_issue.go b/services/mailer/mail_issue.go
index 6f401e5f92..6e63162713 100644
--- a/services/mailer/mail_issue.go
+++ b/services/mailer/mail_issue.go
@@ -8,6 +8,7 @@ import (
"fmt"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
)
@@ -114,9 +115,9 @@ func mailIssueCommentToParticipants(ctx *mailCommentContext, mentions []*models.
}
func mailIssueCommentBatch(ctx *mailCommentContext, users []*models.User, visited map[int64]bool, fromMention bool) error {
- checkUnit := models.UnitTypeIssues
+ checkUnit := unit.TypeIssues
if ctx.Issue.IsPull {
- checkUnit = models.UnitTypePullRequests
+ checkUnit = unit.TypePullRequests
}
langMap := make(map[string][]*models.User)