diff --git a/src/app/components/RenderMessageContent.tsx b/src/app/components/RenderMessageContent.tsx index 55b0ffc2..2457e5e3 100644 --- a/src/app/components/RenderMessageContent.tsx +++ b/src/app/components/RenderMessageContent.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { MsgType } from 'matrix-js-sdk'; import { HTMLReactParserOptions } from 'html-react-parser'; import { Opts } from 'linkifyjs'; +import { config } from 'folds'; import { AudioContent, DownloadFile, @@ -29,7 +30,7 @@ import { ImageViewer } from './image-viewer'; import { PdfViewer } from './Pdf-viewer'; import { TextViewer } from './text-viewer'; import { testMatrixTo } from '../plugins/matrix-to'; -import {IImageContent} from "../../types/matrix/common"; +import { IImageContent } from '../../types/matrix/common'; type RenderMessageContentProps = { displayName: string; @@ -70,9 +71,10 @@ export function RenderMessageContent({ }; const renderCaption = () => { const content: IImageContent = getContent(); - if(content.filename && content.filename !== content.body) { + if (content.filename && content.filename !== content.body) { return ( ( @@ -85,41 +87,40 @@ export function RenderMessageContent({ )} renderUrlsPreview={urlPreview ? renderUrlsPreview : undefined} /> - ) + ); } return null; - } + }; const renderFile = () => ( <> ( - ( - } - /> - )} - renderAsTextFile={() => ( - } - /> - )} - > - - - + ( + } + /> + )} + renderAsTextFile={() => ( + } + /> + )} + > + + )} outlined={outlineAttachment} /> @@ -188,12 +189,12 @@ export function RenderMessageContent({ ( - } - renderViewer={(p) => } - /> + } + renderViewer={(p) => } + /> )} outlined={outlineAttachment} /> @@ -218,13 +219,13 @@ export function RenderMessageContent({ renderThumbnail={ mediaAutoLoad ? () => ( - ( - {body} - )} - /> - ) + ( + {body} + )} + /> + ) : undefined } renderVideo={(p) =>