summaryrefslogtreecommitdiffstats
path: root/models/issue_comment.go
diff options
context:
space:
mode:
authorJonas Franz <info@jonasfranz.software>2017-06-25 20:20:29 +0200
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-06-25 20:20:29 +0200
commit441986a473a666e0a6a34ec49c50b5aa19245cf8 (patch)
tree67d45e4b2268a896649ef093cdd0b01ffed5aa1e /models/issue_comment.go
parent735676267e48e6a57b250825e2e77edbb513e11d (diff)
downloadgitea-441986a473a666e0a6a34ec49c50b5aa19245cf8.tar.gz
gitea-441986a473a666e0a6a34ec49c50b5aa19245cf8.zip
Fix "Dashboard shows deleted comments" (#1995)
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r--models/issue_comment.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index 8be1ca6d40..de963f45f6 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -334,6 +334,8 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err
Content: fmt.Sprintf("%d|%s", opts.Issue.Index, strings.Split(opts.Content, "\n")[0]),
RepoID: opts.Repo.ID,
Repo: opts.Repo,
+ Comment: comment,
+ CommentID: comment.ID,
IsPrivate: opts.Repo.IsPrivate,
}
@@ -666,6 +668,7 @@ func DeleteComment(comment *Comment) error {
return err
}
}
+ sess.Where("comment_id = ?", comment.ID).Cols("is_deleted").Update(&Action{IsDeleted: true})
return sess.Commit()
}