mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Add MAX_STATUS_CHARS
This commit is contained in:
parent
9e67b74d66
commit
de081c7930
2 changed files with 5 additions and 1 deletions
|
|
@ -88,3 +88,7 @@ S3_ALIAS_HOST=files.example.com
|
|||
# -----------------------
|
||||
IP_RETENTION_PERIOD=31556952
|
||||
SESSION_RETENTION_PERIOD=31556952
|
||||
|
||||
# Max status length limit
|
||||
# Maximum allowed character count of one status
|
||||
# MAX_STATUS_CHARS=500
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue