Clean up conversations with UUID as E164

This commit is contained in:
Fedor Indutny 2021-07-13 17:46:02 -07:00 committed by GitHub
parent a22dcc986f
commit 8951665554
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 11 deletions

View file

@ -3,7 +3,6 @@
import { ConversationType } from '../state/ducks/conversations';
import { format, isValidNumber } from '../types/PhoneNumber';
import { normalizeUuid } from './normalizeUuid';
type FormattedContact = Partial<ConversationType> &
Pick<
@ -32,7 +31,7 @@ export function findAndFormatContact(identifier?: string): FormattedContact {
}
const contactModel = window.ConversationController.get(
normalizeUuid(identifier, 'findAndFormatContact')
identifier.toLowerCase()
);
if (contactModel) {
return contactModel.format();