From 705b6f560fd9a5a5ecb4c5c02848804f31821123 Mon Sep 17 00:00:00 2001 From: Sirius Date: Mon, 25 Dec 2023 22:28:47 +0100 Subject: [PATCH] Increase character limit to 1500 --- README.md | 2 +- .../mastodon/features/compose/components/compose_form.jsx | 4 ++-- app/validators/status_length_validator.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7b9d03795a..6021181f77 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Die Instanz basiert auf Mastodon und ist vom offiziellen Quellcode-Repository ge Gegenüber der Mastodon-Standardinstallation gibt es folgende Änderungen. -- Zeichenlimit von 500 auf 700 Zeichen erhöht +- Zeichenlimit von 500 auf 1500 Zeichen erhöht [Vollständige Liste aller Änderungen](https://git.rabbithole.cyou/paravielfalt/mastodon/compare/stable-4.1...paravielfalt-4.1). diff --git a/app/javascript/mastodon/features/compose/components/compose_form.jsx b/app/javascript/mastodon/features/compose/components/compose_form.jsx index c222784a2f..a24803eb06 100644 --- a/app/javascript/mastodon/features/compose/components/compose_form.jsx +++ b/app/javascript/mastodon/features/compose/components/compose_form.jsx @@ -100,7 +100,7 @@ class ComposeForm extends ImmutablePureComponent { const fulltext = this.getFulltextForCharacterCounting(); const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0; - return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 700 || (isOnlyWhitespace && !anyMedia)); + return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 1500 || (isOnlyWhitespace && !anyMedia)); }; handleSubmit = (e) => { @@ -297,7 +297,7 @@ class ComposeForm extends ImmutablePureComponent {
- +
diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb index 9636a6a09d..bb4cb7954a 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 = 700 + MAX_CHARS = 1500 URL_PLACEHOLDER_CHARS = 23 URL_PLACEHOLDER = 'x' * 23