about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-01-05 07:16:46 +0100
committerGitHub <noreply@github.com>2019-01-05 07:16:46 +0100
commit45899cfa691b1e4f43da98c456ae8faa584eb437 (patch)
treeb3bb6355c4cbe8f74b96d463ac5905c5c898cdfa /app/models
parent90398b9d007d10716cb891d341f64018bb60c822 (diff)
Change note length validation to ignore mention domains and URLs (#9717)
Fix #4419
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 97beb416a..11a3c21fe 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -75,7 +75,7 @@ class Account < ApplicationRecord
   validates_with UniqueUsernameValidator, if: -> { local? && will_save_change_to_username? }
   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, length: { maximum: 160 }, if: -> { local? && will_save_change_to_note? }
+  validates :note, note_length: { maximum: 160 }, 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) }