Normalize UUID for formatting contact
This commit is contained in:
parent
d0a6bf400c
commit
81e6198652
1 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
import { ConversationType } from '../state/ducks/conversations';
|
||||
import { format, isValidNumber } from '../types/PhoneNumber';
|
||||
import { normalizeUuid } from './normalizeUuid';
|
||||
|
||||
type FormattedContact = Partial<ConversationType> &
|
||||
Pick<
|
||||
|
@ -30,7 +31,9 @@ export function findAndFormatContact(identifier?: string): FormattedContact {
|
|||
return PLACEHOLDER_CONTACT;
|
||||
}
|
||||
|
||||
const contactModel = window.ConversationController.get(identifier);
|
||||
const contactModel = window.ConversationController.get(
|
||||
normalizeUuid(identifier, 'findAndFormatContact')
|
||||
);
|
||||
if (contactModel) {
|
||||
return contactModel.format();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue