chat-utils,sync-action-utils: provide alternatives for the contact name

This commit is contained in:
Rajeh Taher
2026-01-22 10:29:06 +02:00
parent b6b708ddfe
commit 75b0ba2652
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
}
+1 -1
View File
@@ -45,7 +45,7 @@ export const processContactAction = (
data: [
{
id,
name: action.fullName || undefined,
name: action.fullName || action.firstName || action.username || undefined,
lid: lidJid || undefined,
phoneNumber
}
@@ -2,7 +2,6 @@ import { jest } from '@jest/globals'
import type { ILogger } from '../../Utils/logger'
import { processContactAction } from '../../Utils/sync-action-utils'
describe('processContactAction', () => {
const mockLogger: ILogger = {
warn: jest.fn(),