NeuromatchAcademy / mastodon

A glitchy but lovable microblogging server
https://glitch-soc.github.io/docs/
GNU Affero General Public License v3.0
7 stars 2 forks source link

Make alt text limit an .env parameter #16

Open sneakers-the-rat opened 1 year ago

sneakers-the-rat commented 1 year ago

Alt text should be able to be one million characters long. This pull requests lets the alt text limit be set from .env as MAX_ALT_TEXT_CHARS (defaulting to the current 1500.

Mastodon image description window describing a green bordered image with italic text that says 'alt text character limits should be one million'

Also added to /api/instance and /api/v1/instance

JSON response from the /api/instance endpoint that shows a new field max_alt_text_characters in configuration.media_attachments

Alt text config implementation:

API Changes:

Also fixed an unexplained reversion in https://github.com/mastodon/mastodon/commit/71f2b95106b2e75d3efb40040b29c216c2d99ee6 that invalidates alt text that is longer than the local limit.

github-actions[bot] commented 8 months ago

This pull request has merge conflicts that must be resolved before it can be merged.