mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-19 00:10:15 +00:00
Backport #24202 Close #24195 Fix the bug: 1. The old code doesn't handle `removedfile` event correctly 2. The old code doesn't provide attachments for type=CommentTypeReview --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
parent
95c2cb4b79
commit
d5f2c9d74d
8 changed files with 131 additions and 129 deletions
|
@ -173,7 +173,7 @@ func ListIssueCommentsAndTimeline(ctx *context.APIContext) {
|
|||
IssueID: issue.ID,
|
||||
Since: since,
|
||||
Before: before,
|
||||
Type: issues_model.CommentTypeUnknown,
|
||||
Type: issues_model.CommentTypeUndefined,
|
||||
}
|
||||
|
||||
comments, err := issues_model.FindComments(ctx, opts)
|
||||
|
@ -549,7 +549,7 @@ func editIssueComment(ctx *context.APIContext, form api.EditIssueCommentOption)
|
|||
return
|
||||
}
|
||||
|
||||
if comment.Type != issues_model.CommentTypeComment && comment.Type != issues_model.CommentTypeReview && comment.Type != issues_model.CommentTypeCode {
|
||||
if !comment.Type.HasContentSupport() {
|
||||
ctx.Status(http.StatusNoContent)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue