systemGivenName/systemFamilyName in ContactPill

This commit is contained in:
Fedor Indutny 2022-09-27 16:07:00 -07:00 committed by GitHub
parent 5957c111cf
commit ffac571dd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 24 additions and 3 deletions

View file

@ -165,6 +165,14 @@ export async function toContactRecord(
if (profileFamilyName) {
contactRecord.familyName = profileFamilyName;
}
const systemGivenName = conversation.get('systemGivenName');
if (systemGivenName) {
contactRecord.systemGivenName = systemGivenName;
}
const systemFamilyName = conversation.get('systemFamilyName');
if (systemFamilyName) {
contactRecord.systemFamilyName = systemFamilyName;
}
contactRecord.blocked = conversation.isBlocked();
contactRecord.whitelisted = Boolean(conversation.get('profileSharing'));
contactRecord.archived = Boolean(conversation.get('isArchived'));
@ -934,6 +942,10 @@ export async function mergeContactRecord(
details.push('updated profile name');
}
}
conversation.set({
systemGivenName: dropNull(contactRecord.systemGivenName),
systemFamilyName: dropNull(contactRecord.systemFamilyName),
});
if (contactRecord.identityKey) {
const verified = await conversation.safeGetVerified();