summaryrefslogtreecommitdiffstats
path: root/models/issue_comment.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-12-02 22:43:39 +0800
committerLauris BH <lauris@nix.lv>2019-12-02 16:43:39 +0200
commit6e81eafdd6b5db756d4ea30d759bac944b80e2de (patch)
treec9aea9ae31880cff79bf4ef3de55ad5f810f5ff7 /models/issue_comment.go
parent2fc3eb1d152830001ea5e8655b082adcb7adaab9 (diff)
downloadgitea-6e81eafdd6b5db756d4ea30d759bac944b80e2de.tar.gz
gitea-6e81eafdd6b5db756d4ea30d759bac944b80e2de.zip
Remove unused comment actions (#9222)
* Remove unused comment actions * improve code
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r--models/issue_comment.go17
1 files changed, 3 insertions, 14 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index 1fad141d92..5843689f1b 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -678,7 +678,7 @@ func createDeadlineComment(e *xorm.Session, doer *User, issue *Issue, newDeadlin
if err != nil {
return nil, err
}
- return comment, sendCreateCommentAction(e, opts, comment)
+ return comment, nil
}
// Creates issue dependency comment
@@ -699,13 +699,9 @@ func createIssueDependencyComment(e *xorm.Session, doer *User, issue *Issue, dep
Issue: issue,
DependentIssueID: dependentIssue.ID,
}
- comment, err := createCommentWithNoAction(e, opts)
- if err != nil {
+ if _, err = createCommentWithNoAction(e, opts); err != nil {
return
}
- if err = sendCreateCommentAction(e, opts, comment); err != nil {
- return err
- }
opts = &CreateCommentOptions{
Type: cType,
@@ -714,14 +710,7 @@ func createIssueDependencyComment(e *xorm.Session, doer *User, issue *Issue, dep
Issue: dependentIssue,
DependentIssueID: issue.ID,
}
- comment, err = createCommentWithNoAction(e, opts)
- if err != nil {
- return
- }
- if err = sendCreateCommentAction(e, opts, comment); err != nil {
- return err
- }
-
+ _, err = createCommentWithNoAction(e, opts)
return
}