From c8485419c138b0e922c98631ba00881ea806fcbd Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Fri, 30 Oct 2020 00:34:18 +0000 Subject: [PATCH] Fix bug that would cause failed to decrypt messages in non-encrypted rooms --- src/components/views/messages/MVideoBody.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/messages/MVideoBody.tsx b/src/components/views/messages/MVideoBody.tsx index 3378670f54..fb987a4f0d 100644 --- a/src/components/views/messages/MVideoBody.tsx +++ b/src/components/views/messages/MVideoBody.tsx @@ -143,9 +143,8 @@ export default class MVideoBody extends React.PureComponent { } async _videoOnPlay() { - const autoplay = SettingsStore.getValue("autoplayGifsAndVideos") as boolean; - if (autoplay || this.state.decryptedUrl || this.state.fetchingData || this.state.error) { - // The video has or will have the data. + if (this._getContentUrl() || this.state.fetchingData || this.state.error) { + // We have the file, we are fetching the file, or there is an error. return; } this.setState({ @@ -164,6 +163,7 @@ export default class MVideoBody extends React.PureComponent { this.setState({ decryptedUrl: contentUrl, decryptedBlob: decryptedBlob, + fetchingData: false, }); this.props.onHeightChanged(); }