From 23156c833ebbe5d328e66d884d7d44bb40b81821 Mon Sep 17 00:00:00 2001 From: vini Date: Tue, 10 Feb 2026 21:11:16 -0300 Subject: [PATCH] feat(call): add caller phone number to offer call event (#2190) --- src/Socket/messages-recv.ts | 2 ++ src/Types/Call.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Socket/messages-recv.ts b/src/Socket/messages-recv.ts index 9bedbd26..eeb335e4 100644 --- a/src/Socket/messages-recv.ts +++ b/src/Socket/messages-recv.ts @@ -1349,6 +1349,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => { const call: WACallEvent = { chatId: attrs.from!, from, + callerPn: infoChild.attrs['caller_pn'], id: callId, date: new Date(+attrs.t! * 1000), offline: !!attrs.offline, @@ -1368,6 +1369,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => { if (existingCall) { call.isVideo = existingCall.isVideo call.isGroup = existingCall.isGroup + call.callerPn = call.callerPn || existingCall.callerPn } // delete data once call has ended diff --git a/src/Types/Call.ts b/src/Types/Call.ts index 80972f62..52558972 100644 --- a/src/Types/Call.ts +++ b/src/Types/Call.ts @@ -3,6 +3,7 @@ export type WACallUpdateType = 'offer' | 'ringing' | 'timeout' | 'reject' | 'acc export type WACallEvent = { chatId: string from: string + callerPn?: string isGroup?: boolean groupJid?: string id: string