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