about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorSurinna Curtis <ekiru.0@gmail.com>2017-09-10 19:43:52 -0500
committerSurinna Curtis <ekiru.0@gmail.com>2017-09-10 19:43:52 -0500
commit3cac5bc2c3105ab0daab1e6892348d5be96d66a3 (patch)
tree1d03a9d8e938cb5a2b8da1a5b41e4da33cba3cb1 /app/models
parent29c44fa5fa1f7569326cfbc88af4a369e6c94bc8 (diff)
Fix a spuriously failing spec that assumed we required short bios like upstream
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index d0ebf5a5e..ac27c7923 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -54,6 +54,8 @@ class Account < ApplicationRecord
   include Remotable
   include EmojiHelper
 
+  MAX_NOTE_LENGTH = 500
+
   enum protocol: [:ostatus, :activitypub]
 
   # Local users
@@ -288,7 +290,7 @@ class Account < ApplicationRecord
         note_without_metadata = note[(idx + YAML_END.length) .. -1]
       end
     end
-    if note_without_metadata.mb_chars.grapheme_length > 500
+    if note_without_metadata.mb_chars.grapheme_length > MAX_NOTE_LENGTH
       errors.add(:note, "can't be longer than 500 graphemes")
     end
   end