mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-13 15:14:49 -06:00
fix: timeout error on send status message
This commit is contained in:
parent
23549e3c1f
commit
88c1830bf5
@ -16,6 +16,8 @@
|
||||
* Fix buildkey function in hSet and hDelete
|
||||
* Fix mexico number
|
||||
* Update baileys version
|
||||
* Update in Baileys version that fixes timeout when updating profile picture
|
||||
* Adjusts for fix timeout error on send status message
|
||||
|
||||
# 2.1.1 (2024-09-22 10:31)
|
||||
|
||||
|
@ -1741,9 +1741,25 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
}
|
||||
|
||||
if (sender === 'status@broadcast') {
|
||||
const jidList = message['status'].option.statusJidList;
|
||||
let jidList;
|
||||
if (message['status'].option.allContacts) {
|
||||
const contacts = await this.prismaRepository.contact.findMany({
|
||||
where: {
|
||||
instanceId: this.instanceId,
|
||||
remoteJid: {
|
||||
not: {
|
||||
endsWith: '@g.us',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const batchSize = 500;
|
||||
jidList = contacts.map((contact) => contact.remoteJid);
|
||||
} else {
|
||||
jidList = message['status'].option.statusJidList;
|
||||
}
|
||||
|
||||
const batchSize = 10;
|
||||
|
||||
const batches = Array.from({ length: Math.ceil(jidList.length / batchSize) }, (_, i) =>
|
||||
jidList.slice(i * batchSize, i * batchSize + batchSize),
|
||||
|
Loading…
Reference in New Issue
Block a user