mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Update messages-recv.ts
This commit is contained in:
committed by
Adhiraj Singh
parent
c113e683e7
commit
d05f40b348
@@ -66,20 +66,19 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
await sendNode(stanza)
|
await sendNode(stanza)
|
||||||
}
|
}
|
||||||
|
|
||||||
const rejectCall = async(callId: string) => {
|
const rejectCall = async(callId: string, callFrom: string) => {
|
||||||
const callOffer = callOfferData[callId]: WACallEvent;
|
|
||||||
const stanza: BinaryNode = ({
|
const stanza: BinaryNode = ({
|
||||||
tag: 'call',
|
tag: 'call',
|
||||||
attrs: {
|
attrs: {
|
||||||
from: authState.creds.me!.id,
|
from: authState.creds.me!.id,
|
||||||
to: callOffer.from,
|
to: callFrom,
|
||||||
id: (new Date().getTime() / 1000).toString().replace('.', '-'),
|
id: (new Date().getTime() / 1000).toString().replace('.', '-'),
|
||||||
},
|
},
|
||||||
content: [{
|
content: [{
|
||||||
tag: 'reject',
|
tag: 'reject',
|
||||||
attrs: {
|
attrs: {
|
||||||
'call-id': callId,
|
'call-id': callId,
|
||||||
'call-creator': callOffer.from,
|
'call-creator': callFrom,
|
||||||
count: '0',
|
count: '0',
|
||||||
},
|
},
|
||||||
content: undefined,
|
content: undefined,
|
||||||
|
|||||||
Reference in New Issue
Block a user