mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	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:
		@@ -178,11 +178,15 @@ func CreateCommentReaction(doer *User, issue *Issue, comment *Comment, content s
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func deleteReaction(e *xorm.Session, opts *ReactionOptions) error {
 | 
			
		||||
func deleteReaction(e Engine, opts *ReactionOptions) error {
 | 
			
		||||
	reaction := &Reaction{
 | 
			
		||||
		Type:    opts.Type,
 | 
			
		||||
		UserID:  opts.Doer.ID,
 | 
			
		||||
		IssueID: opts.Issue.ID,
 | 
			
		||||
		Type: opts.Type,
 | 
			
		||||
	}
 | 
			
		||||
	if opts.Doer != nil {
 | 
			
		||||
		reaction.UserID = opts.Doer.ID
 | 
			
		||||
	}
 | 
			
		||||
	if opts.Issue != nil {
 | 
			
		||||
		reaction.IssueID = opts.Issue.ID
 | 
			
		||||
	}
 | 
			
		||||
	if opts.Comment != nil {
 | 
			
		||||
		reaction.CommentID = opts.Comment.ID
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user