mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: add bulk "process" capability to BaileysBufferableEventEmitter
This commit is contained in:
@@ -20,7 +20,6 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
ev,
|
||||
authState,
|
||||
ws,
|
||||
mutationMutex,
|
||||
processingMutex,
|
||||
upsertMessage,
|
||||
resyncAppState,
|
||||
@@ -249,7 +248,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
const update = getBinaryNodeChild(node, 'collection')
|
||||
if(update) {
|
||||
const name = update.attrs.name as WAPatchName
|
||||
await mutationMutex.mutex(() => resyncAppState([name], undefined))
|
||||
await resyncAppState([name], undefined)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -591,10 +590,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
}
|
||||
|
||||
const protoMsg = proto.WebMessageInfo.fromObject(msg)
|
||||
ev.emit(
|
||||
'messages.upsert',
|
||||
{ messages: [protoMsg], type: call.offline ? 'append' : 'notify' }
|
||||
)
|
||||
upsertMessage(protoMsg, call.offline ? 'append' : 'notify')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user