chat-utils: add fallbacks for contact name extraction

Apply consistent fallback pattern for contact names:
- chat-utils.ts: fullName || firstName || username for lidContactAction
- sync-action-utils.ts: fullName || firstName || username for processContactAction

Ensures contact names are extracted regardless of which field WhatsApp populates.
This commit is contained in:
Claude
2026-01-22 20:11:20 +00:00
parent b69f6c6b6b
commit fe9a3166a8
3 changed files with 6 additions and 3 deletions
+5 -1
View File
@@ -930,7 +930,11 @@ export const processSyncAction = (
ev.emit('contacts.upsert', [
{
id: id!,
name: action.lidContactAction.fullName || undefined,
name:
action.lidContactAction.fullName ||
action.lidContactAction.firstName ||
action.lidContactAction.username ||
undefined,
lid: id!,
phoneNumber: undefined
}