about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/compose/containers/options_container.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-06-19 23:42:38 +0200
committerThibaut Girka <thib@sitedethib.com>2019-06-24 16:00:42 +0200
commit967456b6a9ef34d8ffc386b89993d790c26089e1 (patch)
treedcc1bc6b919e334ca171dcb6c2f6243bf637f077 /app/javascript/flavours/glitch/features/compose/containers/options_container.js
parentddd875ad9940c4c7ef53a31af23cd5fe89fcf0c9 (diff)
[Glitch] Add audio uploads
Port front-end changes from f7f23b4a19a84371f44ec5297125e96ba81681a1 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/containers/options_container.js')
-rw-r--r--app/javascript/flavours/glitch/features/compose/containers/options_container.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/containers/options_container.js b/app/javascript/flavours/glitch/features/compose/containers/options_container.js
index c8c7ecd43..df842f3bf 100644
--- a/app/javascript/flavours/glitch/features/compose/containers/options_container.js
+++ b/app/javascript/flavours/glitch/features/compose/containers/options_container.js
@@ -16,7 +16,7 @@ function mapStateToProps (state) {
     acceptContentTypes: state.getIn(['media_attachments', 'accept_content_types']).toArray().join(','),
     resetFileKey: state.getIn(['compose', 'resetFileKey']),
     hasPoll: !!poll,
-    allowMedia: !poll && (media ? media.size < 4 && !media.some(item => item.get('type') === 'video') : true),
+    allowMedia: !poll && (media ? media.size < 4 && !media.some(item => ['video', 'audio'].includes(item.get('type'))) : true),
     hasMedia: media && !!media.size,
     allowPoll: !(media && !!media.size),
     showContentTypeChoice: state.getIn(['local_settings', 'show_content_type_choice']),