diff options
author | 2022-02-08 12:17:18 +0100 | |
---|---|---|
committer | 2022-02-08 12:17:18 +0100 | |
commit | 4c294a596a9e0524f89b80e1608c3411f4fcf679 (patch) | |
tree | 23851533a5f1adb5442fd7c3c034578c34cd3f0d /internal/api/client/media/mediacreate.go | |
parent | update outdated comment (diff) | |
parent | [chore] Drone config update (#383) (diff) | |
download | gotosocial-4c294a596a9e0524f89b80e1608c3411f4fcf679.tar.xz |
Merge branch 'main' into media_refactor
Diffstat (limited to 'internal/api/client/media/mediacreate.go')
-rw-r--r-- | internal/api/client/media/mediacreate.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/internal/api/client/media/mediacreate.go b/internal/api/client/media/mediacreate.go index 7887461ee..5946ed398 100644 --- a/internal/api/client/media/mediacreate.go +++ b/internal/api/client/media/mediacreate.go @@ -149,11 +149,9 @@ func validateCreateMedia(form *model.AttachmentRequest) error { return fmt.Errorf("file size limit exceeded: limit is %d bytes but attachment was %d bytes", maxSize, form.File.Size) } - if len(form.Description) < minDescriptionChars || len(form.Description) > maxDescriptionChars { + if len(form.Description) > maxDescriptionChars { return fmt.Errorf("image description length must be between %d and %d characters (inclusive), but provided image description was %d chars", minDescriptionChars, maxDescriptionChars, len(form.Description)) } - // TODO: validate focus here - return nil } |