about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorchr <chr@cybre.space>2021-03-01 22:44:37 -0800
committerchr <chr@cybre.space>2021-03-01 22:44:37 -0800
commit16c31821d23713a50dfaa62f282e342d3963a7a1 (patch)
tree4da47736387590e4b1c920556dfad62d39da1569 /app/models
parent63f8176496e98487356cb5891f997eacbbfe9b6e (diff)
parent9a43dce739e4d42cab2f98ba4bf0ce13f8ba0d7f (diff)
Merge branch 'feature_longer_bios' into cybrespace-3.3
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 9a1c4cd40..f0cd7c2a5 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -88,8 +88,8 @@ class Account < ApplicationRecord
   validates :username, format: { with: /\A[a-z0-9_]+\z/i }, length: { maximum: 30 }, if: -> { local? && will_save_change_to_username? && actor_type != 'Application' }
   validates_with UnreservedUsernameValidator, if: -> { local? && will_save_change_to_username? }
   validates :display_name, length: { maximum: 30 }, if: -> { local? && will_save_change_to_display_name? }
-  validates :note, note_length: { maximum: 500 }, if: -> { local? && will_save_change_to_note? }
-  validate :note_has_eight_newlines?, if: -> { local? && will_save_change_to_note? }
+  validates :note, note_length: { maximum: 1024 }, if: -> { local? && will_save_change_to_note? }
+  validate :note_has_ten_newlines?, if: -> { local? && will_save_change_to_note? }
   validates :fields, length: { maximum: 4 }, if: -> { local? && will_save_change_to_fields? }
 
   scope :remote, -> { where.not(domain: nil) }
@@ -384,8 +384,8 @@ class Account < ApplicationRecord
     @synchronization_uri_prefix ||= uri[/http(s?):\/\/[^\/]+\//]
   end 
   
-  def note_has_eight_newlines?
-    errors.add(:note, 'Bio can\'t have more then 8 newlines') unless note.count("\n") <= 8
+  def note_has_ten_newlines?
+    errors.add(:note, 'Bio can\'t have more then 10 newlines') unless note.count("\n") <= 10
   end
 
   class Field < ActiveModelSerializers::Model