New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a config file for easily find or change some settings like status max chars #27833
base: main
Are you sure you want to change the base?
Conversation
For easily change, findable.
Mastodon configuration mostly works either through environment variables (loaded from |
@ClearlyClaire I agree with that, but Gargron doesn't seem to agree on changing things like the status character limit easily (#5697 (comment)), so I used third way, and I think it would be better to manage constants in one file than multiple codes. |
I don't know whether Gargron's position has changed on this, but I do not think introducing a third location for settings would change his mind. |
@ClearlyClaire |
I added some values for demonstration, examples. |
Again, I don't think there is a reason to not use env variables for those settings. The fact those limits cannot be changed without changing the source code is on purpose (even though that is something I personally disagree with), so introducing a new config file will not make the changes more likely to be merged. |
I can accept it.
I introduces new file because of this. (It is just a yml file inside of source code.) If I create |
This pull request has merge conflicts that must be resolved before it can be merged. |
Add a config file
config/mastodon.yml
At this time, This will contains:
accounts.max_featured_tags
statuses.max_characters
statuses.url_placeholder_chars
media_attachments.file_size_limit.image
media_attachments.file_size_limit.video
media_attachments.max_description_length
media_attachments.mime_types
polls.max_options
polls.max_option_characters
And will be more on later PRs.
This will fixes #25546, #12265 partially.
I found #5697 PR.
but this PR will only introduces a config file, not env. So It can not be easily switching value, not encouraging to change it.
But there are already many servers which fork and change these values. For those, this will make them comfortable.
So this is trying to make middle ground: