about summary refs log tree commit diff
path: root/app/validators
diff options
context:
space:
mode:
authorbeatrix <beatrix.bitrot@gmail.com>2017-11-17 19:02:40 -0500
committerGitHub <noreply@github.com>2017-11-17 19:02:40 -0500
commit5a9982b425d3db65d813eb0314a27cea16f0f52d (patch)
treeeabdb52c5d75421876397720b5b79e270ea705e9 /app/validators
parent284e2cde81811d6289dde9542f9c987062f9e7c2 (diff)
parentdc16d73bf5f3e7db54e4f21848f40cff3d9172ca (diff)
Merge pull request #223 from glitch-soc/glitchsoc/feature/configurable-status-size
Make character limit configurable (from tootsuite/mastodon#5697)
Diffstat (limited to 'app/validators')
-rw-r--r--app/validators/status_length_validator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb
index 2ce5d1ee9..79d17742a 100644
--- a/app/validators/status_length_validator.rb
+++ b/app/validators/status_length_validator.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class StatusLengthValidator < ActiveModel::Validator
-  MAX_CHARS = 512
+  MAX_CHARS = (ENV['MAX_TOOT_CHARS'] || 500).to_i
 
   def validate(status)
     return unless status.local? && !status.reblog?