File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
src/api/integrations/channel/whatsapp Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 1616* Fix buildkey function in hSet and hDelete
1717* Fix mexico number
1818* Update baileys version
19+ * Update in Baileys version that fixes timeout when updating profile picture
20+ * Adjusts for fix timeout error on send status message
1921
2022# 2.1.1 (2024-09-22 10:31)
2123
Original file line number Diff line number Diff line change @@ -1741,9 +1741,25 @@ export class BaileysStartupService extends ChannelStartupService {
17411741 }
17421742
17431743 if ( sender === 'status@broadcast' ) {
1744- const jidList = message [ 'status' ] . option . statusJidList ;
1744+ let jidList ;
1745+ if ( message [ 'status' ] . option . allContacts ) {
1746+ const contacts = await this . prismaRepository . contact . findMany ( {
1747+ where : {
1748+ instanceId : this . instanceId ,
1749+ remoteJid : {
1750+ not : {
1751+ endsWith : '@g.us' ,
1752+ } ,
1753+ } ,
1754+ } ,
1755+ } ) ;
1756+
1757+ jidList = contacts . map ( ( contact ) => contact . remoteJid ) ;
1758+ } else {
1759+ jidList = message [ 'status' ] . option . statusJidList ;
1760+ }
17451761
1746- const batchSize = 500 ;
1762+ const batchSize = 10 ;
17471763
17481764 const batches = Array . from ( { length : Math . ceil ( jidList . length / batchSize ) } , ( _ , i ) =>
17491765 jidList . slice ( i * batchSize , i * batchSize + batchSize ) ,
You can’t perform that action at this time.
0 commit comments