mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 10:15:43 +03:00
More TS
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
8f8377a71c
commit
5fc35565df
1 changed files with 2 additions and 1 deletions
|
@ -113,13 +113,14 @@ export default class MImageBody extends React.Component<IProps, IState> {
|
|||
return;
|
||||
}
|
||||
|
||||
const content = this.props.mxEvent.getContent() as IMediaEventContent;
|
||||
const content = this.props.mxEvent.getContent<IMediaEventContent>();
|
||||
const httpUrl = this.getContentUrl();
|
||||
const params: ComponentProps<typeof ImageView> = {
|
||||
src: httpUrl,
|
||||
name: content.body?.length > 0 ? content.body : _t('Attachment'),
|
||||
mxEvent: this.props.mxEvent,
|
||||
permalinkCreator: this.props.permalinkCreator,
|
||||
onFinished: () => {},
|
||||
};
|
||||
|
||||
if (content.info) {
|
||||
|
|
Loading…
Reference in a new issue