Replace hard coded forExport string by mxc url
This commit is contained in:
parent
e404fa3cae
commit
6cbbc0ecb4
5 changed files with 8 additions and 5 deletions
|
@ -42,7 +42,7 @@ export default class MAudioBody extends React.Component {
|
|||
}
|
||||
|
||||
_getContentUrl() {
|
||||
if (this.props.forExport) return "forExport";
|
||||
if (this.props.forExport) return this.props.mxEvent.getContent().url;
|
||||
const media = mediaFromContent(this.props.mxEvent.getContent());
|
||||
if (media.isEncrypted) {
|
||||
return this.state.decryptedUrl;
|
||||
|
|
|
@ -172,7 +172,7 @@ export default class MImageBody extends React.Component {
|
|||
}
|
||||
|
||||
_getContentUrl() {
|
||||
if (this.props.forExport) return "forExport";
|
||||
if (this.props.forExport) return this.props.mxEvent.getContent().url;
|
||||
const media = mediaFromContent(this.props.mxEvent.getContent());
|
||||
if (media.isEncrypted) {
|
||||
return this.state.decryptedUrl;
|
||||
|
|
|
@ -78,7 +78,7 @@ export default class MVideoBody extends React.PureComponent<IProps, IState> {
|
|||
}
|
||||
|
||||
private getContentUrl(): string|null {
|
||||
if (this.props.forExport) return "forExport";
|
||||
if (this.props.forExport) return this.props.mxEvent.getContent().url;
|
||||
const media = mediaFromContent(this.props.mxEvent.getContent());
|
||||
if (media.isEncrypted) {
|
||||
return this.state.decryptedUrl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue