1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-05 02:09:05 +09:00

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

This commit is contained in:
Thibaut Girka 2019-02-01 12:45:53 +01:00 committed by ThibG
parent 762e4fdf55
commit f611da4899

View File

@ -134,7 +134,7 @@ export function submitCompose(routerHistory) {
status, status,
in_reply_to_id: getState().getIn(['compose', 'in_reply_to'], null), in_reply_to_id: getState().getIn(['compose', 'in_reply_to'], null),
media_ids: media.map(item => item.get('id')), 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, spoiler_text: spoilerText,
visibility: getState().getIn(['compose', 'privacy']), visibility: getState().getIn(['compose', 'privacy']),
}, { }, {