mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-23 04:22:02 -06:00
fix: adjust settings in whatsapp.baileys.service.ts
Increased retryRequestDelayMs, added maxMsgRetryCount, and updated connectTimeoutMs and qrTimeout values for better performance. Adjusted transactionOpts for more efficient retries. These changes aim to enhance connection stability and message handling efficiency.
This commit is contained in:
parent
7799e6626f
commit
f1c31a70bc
@ -577,9 +577,12 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
browser: number ? ['Chrome (Linux)', session.NAME, release()] : browser,
|
browser: number ? ['Chrome (Linux)', session.NAME, release()] : browser,
|
||||||
version,
|
version,
|
||||||
markOnlineOnConnect: this.localSettings.alwaysOnline,
|
markOnlineOnConnect: this.localSettings.alwaysOnline,
|
||||||
retryRequestDelayMs: 10,
|
retryRequestDelayMs: 350,
|
||||||
connectTimeoutMs: 60_000,
|
maxMsgRetryCount: 4,
|
||||||
qrTimeout: 40_000,
|
fireInitQueries: true,
|
||||||
|
connectTimeoutMs: 20_000,
|
||||||
|
keepAliveIntervalMs: 30_000,
|
||||||
|
qrTimeout: 45_000,
|
||||||
defaultQueryTimeoutMs: undefined,
|
defaultQueryTimeoutMs: undefined,
|
||||||
emitOwnEvents: false,
|
emitOwnEvents: false,
|
||||||
shouldIgnoreJid: (jid) => {
|
shouldIgnoreJid: (jid) => {
|
||||||
@ -597,7 +600,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
return this.historySyncNotification(msg);
|
return this.historySyncNotification(msg);
|
||||||
},
|
},
|
||||||
userDevicesCache: this.userDevicesCache,
|
userDevicesCache: this.userDevicesCache,
|
||||||
transactionOpts: { maxCommitRetries: 10, delayBetweenTriesMs: 10 },
|
transactionOpts: { maxCommitRetries: 5, delayBetweenTriesMs: 2500 },
|
||||||
patchMessageBeforeSending(message) {
|
patchMessageBeforeSending(message) {
|
||||||
if (
|
if (
|
||||||
message.deviceSentMessage?.message?.listMessage?.listType ===
|
message.deviceSentMessage?.message?.listMessage?.listType ===
|
||||||
@ -704,9 +707,12 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
browser: this.phoneNumber ? ['Chrome (Linux)', session.NAME, release()] : browser,
|
browser: this.phoneNumber ? ['Chrome (Linux)', session.NAME, release()] : browser,
|
||||||
version,
|
version,
|
||||||
markOnlineOnConnect: this.localSettings.alwaysOnline,
|
markOnlineOnConnect: this.localSettings.alwaysOnline,
|
||||||
retryRequestDelayMs: 10,
|
retryRequestDelayMs: 350,
|
||||||
connectTimeoutMs: 60_000,
|
maxMsgRetryCount: 4,
|
||||||
qrTimeout: 40_000,
|
fireInitQueries: true,
|
||||||
|
connectTimeoutMs: 20_000,
|
||||||
|
keepAliveIntervalMs: 30_000,
|
||||||
|
qrTimeout: 45_000,
|
||||||
defaultQueryTimeoutMs: undefined,
|
defaultQueryTimeoutMs: undefined,
|
||||||
emitOwnEvents: false,
|
emitOwnEvents: false,
|
||||||
shouldIgnoreJid: (jid) => {
|
shouldIgnoreJid: (jid) => {
|
||||||
@ -724,7 +730,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
return this.historySyncNotification(msg);
|
return this.historySyncNotification(msg);
|
||||||
},
|
},
|
||||||
userDevicesCache: this.userDevicesCache,
|
userDevicesCache: this.userDevicesCache,
|
||||||
transactionOpts: { maxCommitRetries: 10, delayBetweenTriesMs: 10 },
|
transactionOpts: { maxCommitRetries: 5, delayBetweenTriesMs: 2500 },
|
||||||
patchMessageBeforeSending(message) {
|
patchMessageBeforeSending(message) {
|
||||||
if (
|
if (
|
||||||
message.deviceSentMessage?.message?.listMessage?.listType ===
|
message.deviceSentMessage?.message?.listMessage?.listType ===
|
||||||
|
Loading…
Reference in New Issue
Block a user