about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/composer
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-09-04 18:25:28 +0200
committerThibG <thib@sitedethib.com>2018-09-04 19:40:57 +0200
commitc0275cdcb2a4191da2e09bed77ccb2a271888d04 (patch)
treef8b3e5a43abb9e18f551718fa826125f14eccab0 /app/javascript/flavours/glitch/features/composer
parent3d5a789bbb890ffb4e9c63fa436f9db9b7cb70db (diff)
Fix interactions between CW and sensitive flag when spoilersAlwaysOn is set
Diffstat (limited to 'app/javascript/flavours/glitch/features/composer')
-rw-r--r--app/javascript/flavours/glitch/features/composer/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/composer/index.js b/app/javascript/flavours/glitch/features/composer/index.js
index bc409f0a3..77f9ee0c1 100644
--- a/app/javascript/flavours/glitch/features/composer/index.js
+++ b/app/javascript/flavours/glitch/features/composer/index.js
@@ -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') ? ' 👁️' : ''}`}