about summary refs log tree commit diff
path: root/app/models/media_attachment.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-09-29 02:30:00 +0200
committerGitHub <noreply@github.com>2017-09-29 02:30:00 +0200
commit887cd94e963f49523af80d845cfe0ea900f7dadf (patch)
treeb55ceb9c6c6a5f603b515ef3457cdb26e90e8f4e /app/models/media_attachment.rb
parentd2f56d1cbc7ef985c2565ccc899a1a4f3c07e524 (diff)
Increase attachment descriptions to 420 characters (#5139)
Blaze it
Diffstat (limited to 'app/models/media_attachment.rb')
-rw-r--r--app/models/media_attachment.rb4
1 files changed, 2 insertions, 2 deletions
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