Fix interactions between CW and sensitive flag when spoilersAlwaysOn is set

lolsob-rspec
Thibaut Girka 2018-09-04 18:25:28 +02:00 committed by ThibG
parent 345a38fe21
commit 9002ec066a
1 changed files with 2 additions and 2 deletions

View File

@ -485,8 +485,8 @@ class Composer extends React.Component {
onUpload={onUpload}
privacy={privacy}
resetFileKey={resetFileKey}
sensitive={sensitive}
spoiler={spoiler}
sensitive={sensitive || (spoilersAlwaysOn && spoilerText && spoilerText.length > 0)}
spoiler={spoilersAlwaysOn ? (spoilerText && spoilerText.length > 0) : spoiler}
/>
<ComposerPublisher
countText={`${spoilerText}${countableText(text)}${advancedOptions && advancedOptions.get('do_not_federate') ? ' 👁️' : ''}`}