From d05f40b3489c97bfe2d869fa7a96de5f32bf812e Mon Sep 17 00:00:00 2001 From: Rahul Kasireddy <66378906+RahulKasireddy@users.noreply.github.com> Date: Sun, 14 Aug 2022 12:07:06 +0530 Subject: [PATCH] Update messages-recv.ts --- src/Socket/messages-recv.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Socket/messages-recv.ts b/src/Socket/messages-recv.ts index 7305c90..5536e98 100644 --- a/src/Socket/messages-recv.ts +++ b/src/Socket/messages-recv.ts @@ -66,20 +66,19 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => { await sendNode(stanza) } - const rejectCall = async(callId: string) => { - const callOffer = callOfferData[callId]: WACallEvent; + const rejectCall = async(callId: string, callFrom: string) => { const stanza: BinaryNode = ({ tag: 'call', attrs: { from: authState.creds.me!.id, - to: callOffer.from, + to: callFrom, id: (new Date().getTime() / 1000).toString().replace('.', '-'), }, content: [{ tag: 'reject', attrs: { 'call-id': callId, - 'call-creator': callOffer.from, + 'call-creator': callFrom, count: '0', }, content: undefined,