diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/features/compose/components/upload.js | 2 | ||||
-rw-r--r-- | app/models/media_attachment.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/mastodon/features/compose/components/upload.js b/app/javascript/mastodon/features/compose/components/upload.js index c2bf3b72e..cd9e08360 100644 --- a/app/javascript/mastodon/features/compose/components/upload.js +++ b/app/javascript/mastodon/features/compose/components/upload.js @@ -79,7 +79,7 @@ export default class Upload extends ImmutablePureComponent { placeholder={intl.formatMessage(messages.description)} type='text' value={description} - maxLength={140} + maxLength={420} onFocus={this.handleInputFocus} onChange={this.handleInputChange} onBlur={this.handleInputBlur} diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 25e41c209..60380198b 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -59,7 +59,7 @@ class MediaAttachment < ApplicationRecord validates_attachment_size :file, less_than: 8.megabytes validates :account, presence: true - validates :description, length: { maximum: 140 }, if: :local? + validates :description, length: { maximum: 420 }, if: :local? scope :attached, -> { where.not(status_id: nil) } scope :unattached, -> { where(status_id: nil) } @@ -140,7 +140,7 @@ class MediaAttachment < ApplicationRecord end def prepare_description - self.description = description.strip[0...140] unless description.nil? + self.description = description.strip[0...420] unless description.nil? end def set_type_and_extension |