Update messages-recv.ts

This commit is contained in:
Rahul Kasireddy
2022-08-10 13:58:06 +05:30
committed by Adhiraj Singh
parent 570f5e5b86
commit 25950f19cf

View File

@@ -65,19 +65,19 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
await sendNode(stanza) await sendNode(stanza)
} }
const rejectCall = async(call_id) => { const rejectCall = async(call_id: string) => {
const _call_offer = callOfferData[call_id];
const stanza: BinaryNode = { const stanza: BinaryNode = {
tag: 'call', tag: 'call',
attrs: { attrs: {
from: authState.creds.me!.id, from: authState.creds.me!.id,
to: callOfferData[call_id].from, to: _call_offer.from,
id: (new Date().getTime() / 1000).toString().replace('.', '-'),
}, },
content: [{ content: [{
tag: 'reject', tag: 'reject',
attrs: { attrs: {
'call-id': call_id, 'call-id': call_id,
'call-creator': callOfferData[call_id].from, 'call-creator': _call_offer.from,
count: '0', count: '0',
}, },
content: undefined, content: undefined,