@ -120,6 +120,7 @@ export function submitCompose() {
return function ( dispatch , getState ) {
return function ( dispatch , getState ) {
let status = getState ( ) . getIn ( [ 'compose' , 'text' ] , '' ) ;
let status = getState ( ) . getIn ( [ 'compose' , 'text' ] , '' ) ;
let media = getState ( ) . getIn ( [ 'compose' , 'media_attachments' ] ) ;
let media = getState ( ) . getIn ( [ 'compose' , 'media_attachments' ] ) ;
let spoilerText = getState ( ) . getIn ( [ 'compose' , 'spoiler_text' ] , '' ) ;
if ( ( ! status || ! status . length ) && media . size === 0 ) {
if ( ( ! status || ! status . length ) && media . size === 0 ) {
return ;
return ;
@ -133,8 +134,8 @@ export function submitCompose() {
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' ] ) ,
sensitive : getState ( ) . getIn ( [ 'compose' , 'sensitive' ] ) || spoilerText . length > 0 ,
spoiler _text : getState( ) . getIn ( [ 'compose' , 'spoiler_text' ] , '' ) ,
spoiler _text : spoilerText ,
visibility : getState ( ) . getIn ( [ 'compose' , 'privacy' ] ) ,
visibility : getState ( ) . getIn ( [ 'compose' , 'privacy' ] ) ,
} , {
} , {
headers : {
headers : {