about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/status/components/detailed_status.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/status/components/detailed_status.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/status/components/detailed_status.js')
-rw-r--r--app/javascript/flavours/glitch/features/status/components/detailed_status.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/javascript/flavours/glitch/features/status/components/detailed_status.js b/app/javascript/flavours/glitch/features/status/components/detailed_status.js
index bda5e7152..fcfc74eba 100644
--- a/app/javascript/flavours/glitch/features/status/components/detailed_status.js
+++ b/app/javascript/flavours/glitch/features/status/components/detailed_status.js
@@ -144,14 +144,14 @@ export default class DetailedStatus extends ImmutablePureComponent {
     } else if (status.get('media_attachments').size > 0) {
       if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) {
         media = <AttachmentList media={status.get('media_attachments')} />;
-      } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {
-        const video = status.getIn(['media_attachments', 0]);
+      } else if (['video', 'audio'].includes(status.getIn(['media_attachments', 0, 'type']))) {
+        const attachment = status.getIn(['media_attachments', 0]);
         media = (
           <Video
-            preview={video.get('preview_url')}
-            blurhash={video.get('blurhash')}
-            src={video.get('url')}
-            alt={video.get('description')}
+            preview={attachment.get('preview_url')}
+            blurhash={attachment.get('blurhash')}
+            src={attachment.get('url')}
+            alt={attachment.get('description')}
             inline
             sensitive={status.get('sensitive')}
             letterbox={settings.getIn(['media', 'letterbox'])}