Allow download of view once images if received in-call
This commit is contained in:
parent
b392b7c7ee
commit
aade43bfa3
1 changed files with 10 additions and 9 deletions
|
@ -2057,6 +2057,16 @@ export class Message extends React.Component<Props, State> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (attachments && hasNotDownloaded(attachments[0])) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
kickOffAttachmentDownload({
|
||||||
|
attachment: attachments[0],
|
||||||
|
messageId: id,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (isTapToViewExpired) {
|
if (isTapToViewExpired) {
|
||||||
const action =
|
const action =
|
||||||
direction === 'outgoing'
|
direction === 'outgoing'
|
||||||
|
@ -2215,15 +2225,6 @@ export class Message extends React.Component<Props, State> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there an incomplete attachment, do not execute the default action
|
|
||||||
const { attachments } = this.props;
|
|
||||||
if (attachments && attachments.length > 0) {
|
|
||||||
const [firstAttachment] = attachments;
|
|
||||||
if (!firstAttachment.url) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.handleOpen(event);
|
this.handleOpen(event);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue