mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: move ack of notification before processing
This commit is contained in:
@@ -527,6 +527,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
const handleNotification = async(node: BinaryNode) => {
|
const handleNotification = async(node: BinaryNode) => {
|
||||||
const remoteJid = node.attrs.from
|
const remoteJid = node.attrs.from
|
||||||
|
await sendMessageAck(node, { class: 'notification', type: node.attrs.type })
|
||||||
await processingMutex.mutex(
|
await processingMutex.mutex(
|
||||||
remoteJid,
|
remoteJid,
|
||||||
() => {
|
() => {
|
||||||
@@ -548,8 +549,6 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
await sendMessageAck(node, { class: 'notification', type: node.attrs.type })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleUpsertedMessages = async({ messages, type }: BaileysEventMap<any>['messages.upsert']) => {
|
const handleUpsertedMessages = async({ messages, type }: BaileysEventMap<any>['messages.upsert']) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user