summaryrefslogtreecommitdiffstats
path: root/models/issue_comment.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r--models/issue_comment.go35
1 files changed, 0 insertions, 35 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index 0bb313c30b..6786032f41 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -12,7 +12,6 @@ import (
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
- "code.gitea.io/gitea/modules/markup"
"code.gitea.io/gitea/modules/markup/markdown"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/timeutil"
@@ -395,40 +394,6 @@ func (c *Comment) LoadDepIssueDetails() (err error) {
return err
}
-// MailParticipants sends new comment emails to repository watchers
-// and mentioned people.
-func (c *Comment) MailParticipants(opType ActionType, issue *Issue) (err error) {
- return c.mailParticipants(x, opType, issue)
-}
-
-func (c *Comment) mailParticipants(e Engine, opType ActionType, issue *Issue) (err error) {
- mentions := markup.FindAllMentions(c.Content)
- if err = UpdateIssueMentions(e, c.IssueID, mentions); err != nil {
- return fmt.Errorf("UpdateIssueMentions [%d]: %v", c.IssueID, err)
- }
-
- if len(c.Content) > 0 {
- if err = mailIssueCommentToParticipants(e, issue, c.Poster, c.Content, c, mentions); err != nil {
- log.Error("mailIssueCommentToParticipants: %v", err)
- }
- }
-
- switch opType {
- case ActionCloseIssue:
- ct := fmt.Sprintf("Closed #%d.", issue.Index)
- if err = mailIssueCommentToParticipants(e, issue, c.Poster, ct, c, mentions); err != nil {
- log.Error("mailIssueCommentToParticipants: %v", err)
- }
- case ActionReopenIssue:
- ct := fmt.Sprintf("Reopened #%d.", issue.Index)
- if err = mailIssueCommentToParticipants(e, issue, c.Poster, ct, c, mentions); err != nil {
- log.Error("mailIssueCommentToParticipants: %v", err)
- }
- }
-
- return nil
-}
-
func (c *Comment) loadReactions(e Engine) (err error) {
if c.Reactions != nil {
return nil