diff --git a/ts/components/conversation/Message.tsx b/ts/components/conversation/Message.tsx index a7812a749d3..2e49ca98d3d 100644 --- a/ts/components/conversation/Message.tsx +++ b/ts/components/conversation/Message.tsx @@ -819,6 +819,8 @@ export class Message extends React.Component { } = this.props; const showRetry = status === 'error' && direction === 'outgoing'; + const fileName = attachment ? attachment.fileName : null; + const isDangerous = isFileDangerous(fileName || ''); return ( @@ -827,7 +829,11 @@ export class Message extends React.Component { attributes={{ className: 'module-message__context__download', }} - onClick={onDownload} + onClick={() => { + if (onDownload) { + onDownload(isDangerous); + } + }} > {i18n('downloadAttachment')}