parent
5d5a689b38
commit
02ac3025d7
|
@ -493,7 +493,7 @@ class Composer extends React.Component {
|
|||
spoiler={spoilersAlwaysOn ? (spoilerText && spoilerText.length > 0) : spoiler}
|
||||
/>
|
||||
<ComposerPublisher
|
||||
countText={`${spoilerText}${countableText(text)}${advancedOptions && advancedOptions.get('do_not_federate') ? ' 👁️' : ''}`}
|
||||
countText={spoilerText ? '∞' : `${spoilerText}${countableText(text)}${advancedOptions && advancedOptions.get('do_not_federate') ? ' 🐺': ''}`}
|
||||
disabled={disabledButton}
|
||||
intl={intl}
|
||||
onSecondarySubmit={handleSecondarySubmit}
|
||||
|
|
|
@ -46,7 +46,7 @@ export default function ComposerPublisher ({
|
|||
// The result.
|
||||
return (
|
||||
<div className={computedClass}>
|
||||
<span className='count'>{diff}</span>
|
||||
<span className='count'>{countText === '∞' ? '∞' : diff}</span>
|
||||
{sideArm && sideArm !== 'none' ? (
|
||||
<Button
|
||||
className='side_arm'
|
||||
|
|
|
@ -4,6 +4,8 @@ class StatusLengthValidator < ActiveModel::Validator
|
|||
MAX_CHARS = (ENV['MAX_TOOT_CHARS'] || 500).to_i
|
||||
|
||||
def validate(status)
|
||||
status.errors.add(:text, "hard limit of 16k exceeded") if status.text.length > 16384
|
||||
return unless status.spoiler_text.blank?
|
||||
return unless status.local? && !status.reblog?
|
||||
status.errors.add(:text, I18n.t('statuses.over_character_limit', max: MAX_CHARS)) if too_long?(status)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue