Fix handling of audio files in account media gallery (#11629)

Fixes #11627
This commit is contained in:
ThibG 2019-08-20 19:46:41 +02:00 committed by Eugen Rochko
parent 97af209c31
commit b48c7ee059
2 changed files with 7 additions and 1 deletions

View file

@ -100,7 +100,7 @@ class AccountGallery extends ImmutablePureComponent {
}
handleOpenMedia = attachment => {
if (attachment.get('type') === 'video') {
if (['video', 'audio'].includes(attachment.get('type'))) {
this.props.dispatch(openModal('VIDEO', { media: attachment, status: attachment.get('status') }));
} else {
const media = attachment.getIn(['status', 'media_attachments']);