File tree Expand file tree Collapse file tree
app/javascript/mastodon/actions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ export const COMPOSE_POLL_SETTINGS_CHANGE = 'COMPOSE_POLL_SETTINGS_CHANGE';
6060
6161const messages = defineMessages ( {
6262 uploadErrorLimit : { id : 'upload_error.limit' , defaultMessage : 'File upload limit exceeded.' } ,
63+ uploadErrorPoll : { id : 'upload_error.poll' , defaultMessage : 'File upload not allowed with polls.' } ,
6364} ) ;
6465
6566export function changeCompose ( text ) {
@@ -207,6 +208,12 @@ export function uploadCompose(files) {
207208 dispatch ( showAlert ( undefined , messages . uploadErrorLimit ) ) ;
208209 return ;
209210 }
211+
212+ if ( getState ( ) . getIn ( [ 'compose' , 'poll' ] ) ) {
213+ dispatch ( showAlert ( undefined , messages . uploadErrorPoll ) ) ;
214+ return ;
215+ }
216+
210217 dispatch ( uploadComposeRequest ( ) ) ;
211218
212219 for ( const [ i , f ] of Array . from ( files ) . entries ( ) ) {
You can’t perform that action at this time.
0 commit comments