Skip to content

Commit c1dddc3

Browse files
AchoArnoldCopilot
andauthored
Update api/pkg/validators/bulk_message_handler_validator.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c4f7e18 commit c1dddc3

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

api/pkg/validators/bulk_message_handler_validator.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,10 @@ func (v *BulkMessageHandlerValidator) validateMessages(ctx context.Context, mess
241241
result.Add("document", fmt.Sprintf("Row [%d]: The attachment URL [%s] has an invalid url format.", index+2, cleanURL))
242242
} else if parsedURL.Scheme != "http" && parsedURL.Scheme != "https" {
243243
result.Add("document", fmt.Sprintf("Row [%d]: The attachment URL [%s] must use http or https.", index+2, cleanURL))
244-
} else {
245-
if err := validateAttachmentURL(ctx, v.cache, cleanURL); err != nil {
246-
result.Add("attachments", fmt.Sprintf("Row [%d]: The attachment URL [%s] failed validation: %s", index+2, cleanURL, err.Error()))
247-
}
248244
}
249245
}
250246
}
247+
}
251248

252249
if _, err := phonenumbers.Parse(message.FromPhoneNumber, phonenumbers.UNKNOWN_REGION); err != nil {
253250
result.Add("document", fmt.Sprintf("Row [%d]: The FromPhoneNumber [%s] is not a valid E.164 phone number", index+2, message.FromPhoneNumber))

0 commit comments

Comments
 (0)