Mastodon character limit increase â in a Docker environment
For the Docker Mastodon admin newbies.
With the script, you increase the character limit to 5000 characters for your instance.
#!/bin/bash
docker-compose exec web sed -i âs/500/5000/gâ app/javascript/mastodon/features/compose/components/compose_form.js
docker-compose exec web sed -i âs/500/5000/gâ app/validators/status_length_validator.rb
docker-compose exec web sed -i âs/:registrations/:registrations, :max_toot_chars /gâ app/serializers/rest/instance_serializer.rb
docker-compose exec web sed -i âs/private/def max_toot_charsn 5000n endnn private/gâ app/serializers/rest/instance_serializer.rb
docker-compose exec web bundle exec rails assets:precompile && echo âpassâ || echo âfailâ
docker-compose restart
Save the whole thing as 5000.sh.
Then with
Chmod +x 5000.sh
to make it executable. Now you can execute the script with
./5000.sh
wait a moment and you have 5000 characters.
Tested with Mastodon v4.1.0rc3
I myself have only slightly modified the script from this forum post here
https://forums.unraid.net/topic/74350-request-mastodon/
#mastodon #mastoadmin #characterlimit #docker #vps #linux #dockerizedmastodon
#mastodon #mastoadmin #characterlimit #docker #vps #linux #dockerizedmastodon
FĂźr die Docker Mastodon Admin- Neulinge.
Mit dem Script erhĂśht ihr das Zeichenlimit auf 5000 Zeichen bei eurer Instanz.
----
#!/bin/bash
docker-compose exec web sed -i 's/500/5000/g' app/javascript/mastodon/features/compose/components/compose_form.js
docker-compose exec web sed -i 's/500/5000/g' app/validators/status_length_validator.rb
docker-compose exec web sed -i 's/:registrations/:registrations, :max_toot_chars /g' app/serializers/rest/instance_serializer.rb
docker-compose exec web sed -i 's/private/def max_toot_chars\n 5000\n end\n\n private/g' app/serializers/rest/instance_serializer.rb
docker-compose exec web bundle exec rails assets:precompile && echo "pass" || echo "fail"
docker-compose restart
---
das ganze als 5000.sh speichern.
Dann mit Chmod +x 5000.sh ausfĂźhrbar machen und dann mit ./5000.sh ausfĂźhren, etwas warten und ihr habt 5000 Zeichen.
Klappt mit v4.1.0rc3
habe dazu nur leicht das Script hier abgewandelt
https://forums.unraid.net/topic/74350-request-mastodon/
#mastodon #mastoadmin #characterlimit #docker #vps #linux #dockerizedmastodon
#mastodon #mastoadmin #characterlimit #docker #vps #linux #dockerizedmastodon