Enhance Ghost comment mitigation Settings (#14392)

* refactor models.DeleteComment and delete related reactions too

* use deleteComment for UserDeleteWithCommentsMaxDays in DeleteUser

* nits

* Use time.Duration as other time settings have

* docs

* Resolve Fixme & fix potential deadlock

* Disabled by Default

* Update Config Value Description

* switch args

* Update models/issue_comment.go

Co-authored-by: zeripath <art27@cantab.net>

Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
6543andzeripath authored and GitHub committed 2021-01-21 21:56:19 -05:00
1 parent 0e2e73410e
commit a0e424da85
14 files changed
+72 -41

No files matched your search

+2 -2
View File
@@ -43,8 +43,8 @@ func UpdateComment(c *models.Comment, doer *models.User, oldContent string) erro
}
// DeleteComment deletes the comment
func DeleteComment(comment *models.Comment, doer *models.User) error {
if err := models.DeleteComment(comment, doer); err != nil {
func DeleteComment(doer *models.User, comment *models.Comment) error {
if err := models.DeleteComment(comment); err != nil {
return err
}