1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-25 19:08:28 +00:00

Allow deleting comment with content via API like web did (#35346)

Fix #35296
This commit is contained in:
Lunny Xiao
2025-08-25 03:43:11 -07:00
committed by GitHub
parent c7b99c8cc7
commit c4fbccc4ec

View File

@@ -721,8 +721,8 @@ func deleteIssueComment(ctx *context.APIContext) {
if !ctx.IsSigned || (ctx.Doer.ID != comment.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(comment.Issue.IsPull)) {
ctx.Status(http.StatusForbidden)
return
} else if comment.Type != issues_model.CommentTypeComment {
ctx.Status(http.StatusNoContent)
} else if !comment.Type.HasContentSupport() {
ctx.Status(http.StatusBadRequest)
return
}