# GID=1000
# Maximum allowed character count
-# MAX_CHARS=500
+# MAX_TOOT_CHARS=500
import { countableText } from '../util/counter';
import initialState from '../../../initial_state';
-const maxChars = initialState.max_chars;
+const maxChars = initialState.max_toot_chars;
const messages = defineMessages({
placeholder: { id: 'compose_form.placeholder', defaultMessage: 'What is on your mind?' },
class InitialStateSerializer < ActiveModel::Serializer
attributes :meta, :compose, :accounts,
:media_attachments, :settings, :push_subscription,
- :max_chars
+ :max_toot_chars
has_many :custom_emojis, serializer: REST::CustomEmojiSerializer
- def max_chars
+ def max_toot_chars
StatusLengthValidator::MAX_CHARS
end
include RoutingHelper
attributes :uri, :title, :description, :email,
- :version, :urls, :stats, :thumbnail, :max_chars
+ :version, :urls, :stats, :thumbnail, :max_toot_chars
def uri
Rails.configuration.x.local_domain
full_asset_url(instance_presenter.thumbnail.file.url) if instance_presenter.thumbnail
end
- def max_chars
+ def max_toot_chars
StatusLengthValidator::MAX_CHARS
end
# frozen_string_literal: true
class StatusLengthValidator < ActiveModel::Validator
- MAX_CHARS = (ENV['MAX_CHARS'] || 500).to_i
+ MAX_CHARS = (ENV['MAX_TOOT_CHARS'] || 500).to_i
def validate(status)
return unless status.local? && !status.reblog?