Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (16 sloc) 1.27 KB

How to change the character count.

It's pretty easy.

Use sftp to connect to the server and edit the file compose_form.js located at app/javascript/mastodon/features/compose/components.

Now, find line 206 and edit max={500} and change 500 to any other number you want. I used 2048. It should look like this:

    <div className='character-counter__wrapper'><CharacterCounter max={2048} text={text} /></div>

Next, edit line 207 and find length(text) > 500 and replace 500 with whatever number you want. It should look like this:

<div className='compose-form__publish-button-wrapper'><Button text={publishText} onClick={this.handleSubmit} disabled={disabled || this.props.is_uploading || length(text) > 2048 || (text.length !== 0 && text.trim().length === 0)} block /></div>

Now, move to the directory app/validators and open file status_length_validator.rb. Go to line 4 and edit MAX_CHARS = 500, replace 500 with whatever number number that you want. It should look like this:

      MAX_CHARS = 2048

Congrats, save the files, execute RAILS_ENV=production bundle exec rails assets:precompile and sudo systemctl restart mastodon-*.service. Refresh your browser and you should now have a higher character limit!