add max_toot_chars from glitch-soc

This commit is contained in:
Nolan Lawson
2019-12-30 03:40:11 +00:00
committed by Sable
parent da7cd1ab1a
commit 6bd0dadcfd
6 changed files with 20 additions and 6 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class StatusLengthValidator < ActiveModel::Validator
MAX_CHARS = 500
MAX_CHARS = (ENV['MAX_TOOT_CHARS'] || 500).to_i
def validate(status)
return unless status.local? && !status.reblog?