Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix bug that would cause failed to decrypt messages in non-encrypted …
Browse files Browse the repository at this point in the history
…rooms
  • Loading branch information
Half-Shot committed Oct 30, 2020
1 parent d102347 commit c848541
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/views/messages/MVideoBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ export default class MVideoBody extends React.PureComponent<IProps, IState> {
}

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({
Expand All @@ -164,6 +163,7 @@ export default class MVideoBody extends React.PureComponent<IProps, IState> {
this.setState({
decryptedUrl: contentUrl,
decryptedBlob: decryptedBlob,
fetchingData: false,
});
this.props.onHeightChanged();
}
Expand Down

0 comments on commit c848541

Please sign in to comment.