Outgoing: Ensure that sends still succeed without CDS
This commit is contained in:
parent
ce067258a0
commit
ec8ac1db58
4 changed files with 30 additions and 18 deletions
|
@ -204,6 +204,12 @@ export class Lightbox extends React.Component<Props, State> {
|
||||||
|
|
||||||
public previousFocus: HTMLElement | null = null;
|
public previousFocus: HTMLElement | null = null;
|
||||||
|
|
||||||
|
public constructor(props: Props) {
|
||||||
|
super(props);
|
||||||
|
|
||||||
|
this.state = {};
|
||||||
|
}
|
||||||
|
|
||||||
public componentDidMount(): void {
|
public componentDidMount(): void {
|
||||||
this.previousFocus = document.activeElement as HTMLElement;
|
this.previousFocus = document.activeElement as HTMLElement;
|
||||||
|
|
||||||
|
|
|
@ -302,7 +302,7 @@ export async function maybeUpdateGroup({
|
||||||
newRevision,
|
newRevision,
|
||||||
receivedAt,
|
receivedAt,
|
||||||
sentAt,
|
sentAt,
|
||||||
}: MaybeUpdatePropsType) {
|
}: MaybeUpdatePropsType): Promise<void> {
|
||||||
const logId = conversation.idForLogging();
|
const logId = conversation.idForLogging();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -23,10 +23,9 @@ export const SmartContactName: React.ComponentType<ExternalProps> = props => {
|
||||||
getConversationSelector
|
getConversationSelector
|
||||||
);
|
);
|
||||||
|
|
||||||
const conversation = getConversation(conversationId);
|
const conversation = getConversation(conversationId) || {
|
||||||
if (!conversation) {
|
title: i18n('unknownContact'),
|
||||||
throw new Error(`Conversation id ${conversationId} not found!`);
|
};
|
||||||
}
|
|
||||||
|
|
||||||
return <ContactName i18n={i18n} {...conversation} />;
|
return <ContactName i18n={i18n} {...conversation} />;
|
||||||
};
|
};
|
||||||
|
|
|
@ -584,6 +584,7 @@ export default class OutgoingMessage {
|
||||||
'sendToIdentifier: window.textsecure.messaging is not available!'
|
'sendToIdentifier: window.textsecure.messaging is not available!'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
const lookup = await window.textsecure.messaging.getUuidsForE164s([
|
const lookup = await window.textsecure.messaging.getUuidsForE164s([
|
||||||
identifier,
|
identifier,
|
||||||
]);
|
]);
|
||||||
|
@ -600,6 +601,12 @@ export default class OutgoingMessage {
|
||||||
new Error('User is not registered')
|
new Error('User is not registered')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
window.log.error(
|
||||||
|
`sentToIdentifier: Failed to fetch UUID for identifier ${identifier}`,
|
||||||
|
error && error.stack ? error.stack : error
|
||||||
|
);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`sendToIdentifier: identifier ${identifier} was neither a UUID or E164`
|
`sendToIdentifier: identifier ${identifier} was neither a UUID or E164`
|
||||||
|
|
Loading…
Reference in a new issue