Created
March 13, 2021 16:15
-
-
Save lindgrenj6/d2846a135656cfae20960b2fa156d62c to your computer and use it in GitHub Desktop.
Bump Mastodon Toot Char Length
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js | |
index 8af806ec4..a0da1e9d3 100644 | |
--- a/app/javascript/mastodon/features/compose/components/compose_form.js | |
+++ b/app/javascript/mastodon/features/compose/components/compose_form.js | |
@@ -86,7 +86,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) > 1024 || (isOnlyWhitespace && !anyMedia)); | |
} | |
handleSubmit = () => { | |
@@ -249,7 +249,7 @@ class ComposeForm extends ImmutablePureComponent { | |
<PrivacyDropdownContainer /> | |
<SpoilerButtonContainer /> | |
</div> | |
- <div className='character-counter__wrapper'><CharacterCounter max={500} text={this.getFulltextForCharacterCounting()} /></div> | |
+ <div className='character-counter__wrapper'><CharacterCounter max={1024} text={this.getFulltextForCharacterCounting()} /></div> | |
</div> | |
<div className='compose-form__publish'> | |
diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb | |
index 93bae2fa8..e67b794ab 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 = 1024 | |
def validate(status) | |
return unless status.local? && !status.reblog? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment