diff --git a/src/api/services/channels/whatsapp.baileys.service.ts b/src/api/services/channels/whatsapp.baileys.service.ts index 0f4d1d08a..efa5fc9e8 100644 --- a/src/api/services/channels/whatsapp.baileys.service.ts +++ b/src/api/services/channels/whatsapp.baileys.service.ts @@ -577,9 +577,12 @@ export class BaileysStartupService extends ChannelStartupService { browser: number ? ['Chrome (Linux)', session.NAME, release()] : browser, version, markOnlineOnConnect: this.localSettings.alwaysOnline, - retryRequestDelayMs: 10, - connectTimeoutMs: 60_000, - qrTimeout: 40_000, + retryRequestDelayMs: 350, + maxMsgRetryCount: 4, + fireInitQueries: true, + connectTimeoutMs: 20_000, + keepAliveIntervalMs: 30_000, + qrTimeout: 45_000, defaultQueryTimeoutMs: undefined, emitOwnEvents: false, shouldIgnoreJid: (jid) => { @@ -597,7 +600,7 @@ export class BaileysStartupService extends ChannelStartupService { return this.historySyncNotification(msg); }, userDevicesCache: this.userDevicesCache, - transactionOpts: { maxCommitRetries: 10, delayBetweenTriesMs: 10 }, + transactionOpts: { maxCommitRetries: 5, delayBetweenTriesMs: 2500 }, patchMessageBeforeSending(message) { if ( message.deviceSentMessage?.message?.listMessage?.listType === @@ -704,9 +707,12 @@ export class BaileysStartupService extends ChannelStartupService { browser: this.phoneNumber ? ['Chrome (Linux)', session.NAME, release()] : browser, version, markOnlineOnConnect: this.localSettings.alwaysOnline, - retryRequestDelayMs: 10, - connectTimeoutMs: 60_000, - qrTimeout: 40_000, + retryRequestDelayMs: 350, + maxMsgRetryCount: 4, + fireInitQueries: true, + connectTimeoutMs: 20_000, + keepAliveIntervalMs: 30_000, + qrTimeout: 45_000, defaultQueryTimeoutMs: undefined, emitOwnEvents: false, shouldIgnoreJid: (jid) => { @@ -724,7 +730,7 @@ export class BaileysStartupService extends ChannelStartupService { return this.historySyncNotification(msg); }, userDevicesCache: this.userDevicesCache, - transactionOpts: { maxCommitRetries: 10, delayBetweenTriesMs: 10 }, + transactionOpts: { maxCommitRetries: 5, delayBetweenTriesMs: 2500 }, patchMessageBeforeSending(message) { if ( message.deviceSentMessage?.message?.listMessage?.listType ===