Fix sending to embedded contact
This commit is contained in:
parent
bae3394efc
commit
e0f479ca81
3 changed files with 14 additions and 6 deletions
|
@ -1626,7 +1626,11 @@ export class Message extends React.PureComponent<Props, State> {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => startConversation(firstNumber, uuid)}
|
onClick={e => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
startConversation(firstNumber, uuid);
|
||||||
|
}}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
'module-message__send-message-button',
|
'module-message__send-message-button',
|
||||||
noBottomLeftCurve &&
|
noBottomLeftCurve &&
|
||||||
|
@ -2662,7 +2666,7 @@ export class Message extends React.PureComponent<Props, State> {
|
||||||
isTapToView,
|
isTapToView,
|
||||||
isTapToViewExpired,
|
isTapToViewExpired,
|
||||||
kickOffAttachmentDownload,
|
kickOffAttachmentDownload,
|
||||||
openConversation,
|
startConversation,
|
||||||
openGiftBadge,
|
openGiftBadge,
|
||||||
showContactDetail,
|
showContactDetail,
|
||||||
showVisualAttachment,
|
showVisualAttachment,
|
||||||
|
@ -2773,13 +2777,15 @@ export class Message extends React.PureComponent<Props, State> {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
this.audioButtonRef.current.click();
|
this.audioButtonRef.current.click();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contact && contact.firstNumber && contact.uuid) {
|
if (contact && contact.firstNumber && contact.uuid) {
|
||||||
openConversation(contact.firstNumber);
|
startConversation(contact.firstNumber, contact.uuid);
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contact) {
|
if (contact) {
|
||||||
|
|
|
@ -564,8 +564,10 @@ export class Timeline extends React.Component<
|
||||||
public override componentDidMount(): void {
|
public override componentDidMount(): void {
|
||||||
const containerEl = this.containerRef.current;
|
const containerEl = this.containerRef.current;
|
||||||
const messagesEl = this.messagesRef.current;
|
const messagesEl = this.messagesRef.current;
|
||||||
|
const { isConversationSelected } = this.props;
|
||||||
strictAssert(
|
strictAssert(
|
||||||
containerEl && messagesEl,
|
// We don't render anything unless the conversation is selected
|
||||||
|
(containerEl && messagesEl) || !isConversationSelected,
|
||||||
'<Timeline> mounted without some refs'
|
'<Timeline> mounted without some refs'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ function checkForAccount(
|
||||||
|
|
||||||
const conversation = window.ConversationController.get(phoneNumber);
|
const conversation = window.ConversationController.get(phoneNumber);
|
||||||
if (conversation && conversation.get('uuid')) {
|
if (conversation && conversation.get('uuid')) {
|
||||||
log.error(`checkForAccount: found ${phoneNumber} in existing contacts`);
|
log.info(`checkForAccount: found ${phoneNumber} in existing contacts`);
|
||||||
const uuid = conversation.get('uuid');
|
const uuid = conversation.get('uuid');
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
|
@ -81,7 +81,7 @@ function checkForAccount(
|
||||||
|
|
||||||
let uuid: UUIDStringType | undefined;
|
let uuid: UUIDStringType | undefined;
|
||||||
|
|
||||||
log.error(`checkForAccount: looking ${phoneNumber} up on server`);
|
log.info(`checkForAccount: looking ${phoneNumber} up on server`);
|
||||||
try {
|
try {
|
||||||
const uuidLookup = await window.textsecure.messaging.getUuidsForE164s([
|
const uuidLookup = await window.textsecure.messaging.getUuidsForE164s([
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
|
|
Loading…
Reference in a new issue