superseriousbusiness / gotosocial

Fast, fun, small ActivityPub server.
https://docs.gotosocial.org
GNU Affero General Public License v3.0
3.57k stars 300 forks source link

[bug] `media-description-min-chars` config not enforced at toot time #899

Closed noerw closed 1 year ago

noerw commented 1 year ago

Describe the bug with a clear and concise description of what the bug is.

It seems #369 broke the media-description-min-chars config var, as I was able to post a toot with an image, without entering a image description.

What's your GoToSocial Version?

0.5.2 git-c31f219

What you expected to happen?

It shouldn't be possible to toot without an image description if media-description-min-chars: 1 is configured.

→ the POST /toot endpoint (pardon, idk what its URL actually is) should enforce the media-description-min-chars config on all referenced media items.

How to reproduce it?

Anything else we need to know?

Previous disussion in #338

tsmethurst commented 1 year ago

Thanks for opening this! I'll investigate!