mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 08:05:01 +00:00 
			
		
		
		
	Allow deleting comment with content via API like web did (#35346)
Fix #35296
This commit is contained in:
		@@ -721,8 +721,8 @@ func deleteIssueComment(ctx *context.APIContext) {
 | 
				
			|||||||
	if !ctx.IsSigned || (ctx.Doer.ID != comment.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(comment.Issue.IsPull)) {
 | 
						if !ctx.IsSigned || (ctx.Doer.ID != comment.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(comment.Issue.IsPull)) {
 | 
				
			||||||
		ctx.Status(http.StatusForbidden)
 | 
							ctx.Status(http.StatusForbidden)
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	} else if comment.Type != issues_model.CommentTypeComment {
 | 
						} else if !comment.Type.HasContentSupport() {
 | 
				
			||||||
		ctx.Status(http.StatusNoContent)
 | 
							ctx.Status(http.StatusBadRequest)
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user