Change defaults for conversation title generation

This commit is contained in:
Fedor Indutny 2024-02-07 13:38:43 -08:00 committed by GitHub
parent 6a165da589
commit bd922433e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 142 additions and 24 deletions

View file

@ -13,12 +13,13 @@ export function getE164(
| 'systemGivenName'
| 'systemFamilyName'
| 'e164'
| 'notSharingPhoneNumber'
| 'sharingPhoneNumber'
| 'profileKey'
>
): string | undefined {
const { e164, notSharingPhoneNumber = false } = attributes;
const { e164, profileKey, sharingPhoneNumber } = attributes;
if (notSharingPhoneNumber && !isInSystemContacts(attributes)) {
if (!sharingPhoneNumber && profileKey && !isInSystemContacts(attributes)) {
return undefined;
}