Use HasAttachmentSupport method

This commit is contained in:
oliverpool 2024-04-08 15:24:00 +02:00
parent 33444a3308
commit 9ae805538a

View file

@ -377,9 +377,7 @@ func (comments CommentList) loadDependentIssues(ctx context.Context) error {
func (comments CommentList) getAttachmentCommentIDs() []int64 { func (comments CommentList) getAttachmentCommentIDs() []int64 {
ids := make(container.Set[int64], len(comments)) ids := make(container.Set[int64], len(comments))
for _, comment := range comments { for _, comment := range comments {
if comment.Type == CommentTypeComment || if comment.Type.HasAttachmentSupport() {
comment.Type == CommentTypeReview ||
comment.Type == CommentTypeCode {
ids.Add(comment.ID) ids.Add(comment.ID)
} }
} }