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
committermultiple creatures <dev@multiple-creature.party>2020-02-22 01:42:27 -0600
commit11729887666efc6b9ec44f81cc934a202b11064e (patch)
treeef21ff5a4b889e3359acccdadc98038f6f8fc203 /app/javascript/flavours/glitch/features/compose/containers/options_container.js
parentfbbbc9b81ae6ff8ca97185abcb36e93a323e65d8 (diff)
port glitch-soc@`967456b` to monsterfork: [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 ee15ffd6e..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 < 6 && !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']),