Fix sending to embedded contact

This commit is contained in:
Fedor Indutny 2022-06-27 17:37:05 -07:00 committed by GitHub
parent bae3394efc
commit e0f479ca81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 6 deletions

View file

@ -1626,7 +1626,11 @@ export class Message extends React.PureComponent<Props, State> {
return (
<button
type="button"
onClick={() => startConversation(firstNumber, uuid)}
onClick={e => {
e.preventDefault();
e.stopPropagation();
startConversation(firstNumber, uuid);
}}
className={classNames(
'module-message__send-message-button',
noBottomLeftCurve &&
@ -2662,7 +2666,7 @@ export class Message extends React.PureComponent<Props, State> {
isTapToView,
isTapToViewExpired,
kickOffAttachmentDownload,
openConversation,
startConversation,
openGiftBadge,
showContactDetail,
showVisualAttachment,
@ -2773,13 +2777,15 @@ export class Message extends React.PureComponent<Props, State> {
event.stopPropagation();
this.audioButtonRef.current.click();
return;
}
if (contact && contact.firstNumber && contact.uuid) {
openConversation(contact.firstNumber);
startConversation(contact.firstNumber, contact.uuid);
event.preventDefault();
event.stopPropagation();
return;
}
if (contact) {