|
|
@ -1,7 +1,7 @@ |
|
|
|
# frozen_string_literal: true |
|
|
|
# frozen_string_literal: true |
|
|
|
|
|
|
|
|
|
|
|
class StatusLengthValidator < ActiveModel::Validator |
|
|
|
class StatusLengthValidator < ActiveModel::Validator |
|
|
|
MAX_CHARS = 500 |
|
|
|
MAX_CHARS = (ENV["MAX_CHARS"] || 500).to_i |
|
|
|
|
|
|
|
|
|
|
|
def validate(status) |
|
|
|
def validate(status) |
|
|
|
return unless status.local? && !status.reblog? |
|
|
|
return unless status.local? && !status.reblog? |
|
|
|