mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: add "offer" call ack
This commit is contained in:
@@ -7,6 +7,8 @@ import { KEY_BUNDLE_TYPE } from "../Defaults"
|
||||
import { makeChatsSocket } from "./chats"
|
||||
import { extractGroupMetadata } from "./groups"
|
||||
|
||||
const CALL_TAGS_TO_ACK = ['terminate', 'relaylatency', 'offer']
|
||||
|
||||
const isReadReceipt = (type: string) => type === 'read' || type === 'read-self'
|
||||
|
||||
export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
@@ -465,7 +467,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
logger.info({ node }, 'recv call')
|
||||
|
||||
const [child] = getAllBinaryNodeChildren(node)
|
||||
if(child.tag === 'terminate' || child.tag === 'relaylatency') {
|
||||
if(CALL_TAGS_TO_ACK.includes(child.tag)) {
|
||||
await sendMessageAck(node, { class: 'call', type: child.tag })
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user