Update messages-recv.ts

This commit is contained in:
Rahul Kasireddy
2022-08-10 14:02:47 +05:30
committed by Adhiraj Singh
parent 25950f19cf
commit 3164a8c597

View File

@@ -66,7 +66,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
}
const rejectCall = async(call_id: string) => {
const _call_offer = callOfferData[call_id];
const _call_offer = (call_id ? callOfferData[call_id] : callOfferData[Object.keys(callOfferData)[0]]);
const stanza: BinaryNode = {
tag: 'call',
attrs: {
@@ -84,7 +84,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
}],
}
logger.debug({ call_id, caller: callOfferData[call_id].from, me: authState.creds.me.id, }, 'rejecting call')
logger.debug({ call_id, caller: _call_offer.from, me: authState.creds.me!.id, }, 'rejecting call')
await sendNode(stanza)
}