From da2fba43895b71eb7a0a7b46854cc7a81eb96272 Mon Sep 17 00:00:00 2001 From: Ducky Date: Wed, 17 May 2023 22:41:14 +0100 Subject: [PATCH] Gearheads: bump post limit to 2500 (more than Twitter Blue!) --- .../mastodon/features/compose/components/compose_form.js | 4 ++-- app/validators/status_length_validator.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js index e641d59f4..d9c530fc1 100644 --- a/app/javascript/mastodon/features/compose/components/compose_form.js +++ b/app/javascript/mastodon/features/compose/components/compose_form.js @@ -90,7 +90,7 @@ class ComposeForm extends ImmutablePureComponent { const fulltext = this.getFulltextForCharacterCounting(); const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0; - return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 500 || (isOnlyWhitespace && !anyMedia)); + return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 2500 || (isOnlyWhitespace && !anyMedia)); }; handleSubmit = (e) => { @@ -280,7 +280,7 @@ class ComposeForm extends ImmutablePureComponent {
- +
diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb index e107912b7..710a71dc2 100644 --- a/app/validators/status_length_validator.rb +++ b/app/validators/status_length_validator.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class StatusLengthValidator < ActiveModel::Validator - MAX_CHARS = 500 + MAX_CHARS = 2500 URL_PLACEHOLDER_CHARS = 23 URL_PLACEHOLDER = 'x' * 23