Make sure to recompile assets after making these edits for your changes to take effect.
- Edit
app/validators/status_length_validator.rb
- On line #4, change
MAX_CHARS
from 500 to your desired maximum. - Edit
app/javascript/mastodon/features/compose/components/compose_form.js
- On line #202, change
CharacterCounter max={500}
to the same max value as before - On line #206, change
length(text) > 500
to the same max value as before
- Edit
app/models/account.rb
- On line #78, change
validates :note, note_length: { maximum: 500 }
to your desired maximum - Edit
app/views/settings/profiles/show.html.haml
- On line #10, change
input_html: { maxlength: 500 }
to your desired maximum
- Edit
app/models/account.rb
- On line #79, change
validates :fields, length: { maximum: 4 }
to your desired maximum - On line #262, change
DEFAULT_FIELDS_SIZE = 4
to the same max value as before
- Edit
app/models/account.rb
- On lines #366-370, define your own
string_limit
. You will probably be most interested in changingif account.local? 255
to something <= 2047, since vanilla instances will refuse your fields as invalid if they are longer than this. You can also optionally decide to accept remote profile fields that are longer than 2047 characters (but why would you, if virtually all are below this?), or be more strict and only accept shorter profile fields.