diff options
author | Starfall <us@starfall.systems> | 2022-01-31 12:50:14 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2022-01-31 12:50:14 -0600 |
commit | 17265f47f8f931e70699088dd8bd2a1c7b78112b (patch) | |
tree | a1dde2630cd8e481cc4c5d047c4af241a251def0 /app/validators/status_length_validator.rb | |
parent | 129962006c2ebcd195561ac556887dc87d32081c (diff) | |
parent | d6f3261c6cb810ea4eb6f74b9ee62af0d94cbd52 (diff) |
Merge branch 'glitchsoc'
Diffstat (limited to 'app/validators/status_length_validator.rb')
-rw-r--r-- | app/validators/status_length_validator.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb index 11997024f..2a3ac8862 100644 --- a/app/validators/status_length_validator.rb +++ b/app/validators/status_length_validator.rb @@ -2,7 +2,8 @@ class StatusLengthValidator < ActiveModel::Validator MAX_CHARS = (ENV['MAX_TOOT_CHARS'] || 500).to_i - URL_PLACEHOLDER = "\1#{'x' * 23}" + URL_PLACEHOLDER_CHARS = 23 + URL_PLACEHOLDER = "\1#{'x' * URL_PLACEHOLDER_CHARS}" def validate(status) return unless status.local? && !status.reblog? |