Do not mark toots as sensitive if they don't have any media attached

local
Thibaut Girka 5 years ago committed by ThibG
parent 762e4fdf55
commit f611da4899
  1. 2
      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']),
}, {

Loading…
Cancel
Save