about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-02-01 12:45:53 +0100
committerThibG <thib@sitedethib.com>2019-02-01 15:55:28 +0100
commitf611da489929d2592b61b0c0f7c870ae33782343 (patch)
treeb43689e09ac73140774c37744435de4df8289090 /app/javascript
parent762e4fdf557ff7cbdd9fce301060f11bb23cb84e (diff)
Do not mark toots as sensitive if they don't have any media attached
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/flavours/glitch/actions/compose.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/actions/compose.js b/app/javascript/flavours/glitch/actions/compose.js
index 71d3fb1b2..04e857713 100644
--- a/app/javascript/flavours/glitch/actions/compose.js
+++ b/app/javascript/flavours/glitch/actions/compose.js
@@ -134,7 +134,7 @@ export function submitCompose(routerHistory) {
       status,
       in_reply_to_id: getState().getIn(['compose', 'in_reply_to'], null),
       media_ids: media.map(item => item.get('id')),
-      sensitive: getState().getIn(['compose', 'sensitive']) || spoilerText.length > 0,
+      sensitive: getState().getIn(['compose', 'sensitive']) || (spoilerText.length > 0 && media.size !== 0),
       spoiler_text: spoilerText,
       visibility: getState().getIn(['compose', 'privacy']),
     }, {