Handle mxc urls for non-encrypted rooms

This commit is contained in:
Jaiwanth 2021-06-29 12:54:44 +05:30
parent 747273cc9c
commit 497d8102e2
5 changed files with 14 additions and 9 deletions

View file

@ -78,8 +78,9 @@ export default class MVideoBody extends React.PureComponent<IProps, IState> {
}
private getContentUrl(): string|null {
if (this.props.forExport) return this.props.mxEvent.getContent().url;
const media = mediaFromContent(this.props.mxEvent.getContent());
const content = this.props.mxEvent.getContent();
if (this.props.forExport) return content.file?.url || content.url;
const media = mediaFromContent(content);
if (media.isEncrypted) {
return this.state.decryptedUrl;
} else {