Delint
This commit is contained in:
parent
5c78acfca4
commit
3efa699b88
7 changed files with 23 additions and 22 deletions
|
@ -86,6 +86,7 @@ export default class MAudioBody extends React.PureComponent<IBodyProps, IState>
|
|||
|
||||
if (this.props.forExport) {
|
||||
const content = this.props.mxEvent.getContent();
|
||||
// During export, the content url will point to the MSC, which will later point to a local url
|
||||
const contentUrl = content.file?.url || content.url;
|
||||
return (
|
||||
<span className="mx_MAudioBody">
|
||||
|
|
|
@ -213,6 +213,7 @@ export default class MFileBody extends React.Component<IProps, IState> {
|
|||
|
||||
if (this.props.forExport) {
|
||||
const content = this.props.mxEvent.getContent();
|
||||
// During export, the content url will point to the MSC, which will later point to a local url
|
||||
return <span className="mx_MFileBody">
|
||||
<a href={content.file?.url || content.url}>
|
||||
{ placeholder }
|
||||
|
|
|
@ -164,7 +164,8 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {
|
|||
|
||||
protected getContentUrl(): string {
|
||||
const content: IMediaEventContent = this.props.mxEvent.getContent();
|
||||
if (this.props.forExport) return content.url || content.file.url;
|
||||
// During export, the content url will point to the MSC, which will later point to a local url
|
||||
if (this.props.forExport) return content.url || content.file?.url;
|
||||
if (this.media.isEncrypted) {
|
||||
return this.state.decryptedUrl;
|
||||
} else {
|
||||
|
|
|
@ -78,6 +78,7 @@ export default class MVideoBody extends React.PureComponent<IBodyProps, IState>
|
|||
|
||||
private getContentUrl(): string|null {
|
||||
const content = this.props.mxEvent.getContent<IMediaEventContent>();
|
||||
// During export, the content url will point to the MSC, which will later point to a local url
|
||||
if (this.props.forExport) return content.file?.url || content.url;
|
||||
const media = mediaFromContent(content);
|
||||
if (media.isEncrypted) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue