Support phone number sharing flag on profile

This commit is contained in:
Fedor Indutny 2024-01-02 20:36:49 +01:00 committed by GitHub
parent 23f39a0dc7
commit d71da5c486
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 155 additions and 33 deletions

View file

@ -11,6 +11,7 @@ import {
getSourceServiceId,
} from '../messages/helpers';
import { isDirectConversation, isGroupV2 } from './whatTypeOfConversation';
import { getE164 } from './getE164';
export function getMessageIdForLogging(
message: Pick<
@ -29,8 +30,8 @@ export function getConversationIdForLogging(
conversation: ConversationAttributesType
): string {
if (isDirectConversation(conversation)) {
const { serviceId, pni, e164, id } = conversation;
return `${serviceId || pni || e164} (${id})`;
const { serviceId, pni, id } = conversation;
return `${serviceId || pni || getE164(conversation)} (${id})`;
}
if (isGroupV2(conversation)) {
return `groupv2(${conversation.groupId})`;