Add configuration attribute to GET /api/v1/instance (#16485)

List various values like file size limits and supported mime types
This commit is contained in:
Eugen Rochko
2021-07-10 17:58:41 +02:00
committed by GitHub
parent 3d5183e99c
commit 275fa4746b
2 changed files with 30 additions and 2 deletions

View File

@@ -2,7 +2,8 @@
class StatusLengthValidator < ActiveModel::Validator
MAX_CHARS = 500
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?