From 1fef0ec2086e1c888f0d00caad406829ad094873 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Tue, 29 Aug 2023 20:57:34 +0200 Subject: [PATCH] Use contact's familyName if givenName is empty --- ts/util/combineNames.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ts/util/combineNames.ts b/ts/util/combineNames.ts index 7f83fe9524c3..eff282c46a63 100644 --- a/ts/util/combineNames.ts +++ b/ts/util/combineNames.ts @@ -44,10 +44,14 @@ export function combineNames( given?: string, family?: string ): undefined | string { - if (!given) { + if (!given && !family) { return undefined; } + if (!given) { + return family; + } + // Users who haven't upgraded to dual-name, or went minimal, will just have a given name if (!family) { return given;