From 25950f19cfb99da7dde5eb355b4ab909d47a0526 Mon Sep 17 00:00:00 2001 From: Rahul Kasireddy <66378906+RahulKasireddy@users.noreply.github.com> Date: Wed, 10 Aug 2022 13:58:06 +0530 Subject: [PATCH] Update messages-recv.ts --- src/Socket/messages-recv.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Socket/messages-recv.ts b/src/Socket/messages-recv.ts index 08463ea..530f295 100644 --- a/src/Socket/messages-recv.ts +++ b/src/Socket/messages-recv.ts @@ -65,19 +65,19 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => { await sendNode(stanza) } - const rejectCall = async(call_id) => { + const rejectCall = async(call_id: string) => { + const _call_offer = callOfferData[call_id]; const stanza: BinaryNode = { tag: 'call', attrs: { from: authState.creds.me!.id, - to: callOfferData[call_id].from, - id: (new Date().getTime() / 1000).toString().replace('.', '-'), + to: _call_offer.from, }, content: [{ tag: 'reject', attrs: { 'call-id': call_id, - 'call-creator': callOfferData[call_id].from, + 'call-creator': _call_offer.from, count: '0', }, content: undefined,