Add MAX_STATUS_CHARS

This commit is contained in:
bgme 2026-01-30 23:56:31 +08:00
parent 9e67b74d66
commit de081c7930
2 changed files with 5 additions and 1 deletions

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
class StatusLengthValidator < ActiveModel::Validator
MAX_CHARS = 500
MAX_CHARS = (ENV['MAX_STATUS_CHARS'] || 500).to_i
URL_PLACEHOLDER_CHARS = 23
URL_PLACEHOLDER = 'x' * 23