fix: retry messages

This commit is contained in:
Davidson Gomes 2024-04-17 18:14:11 -03:00
parent 5ae5d8546e
commit b3aeed7fc1

View File

@ -1061,8 +1061,6 @@ export class BaileysStartupService extends WAStartupService {
} }
} }
await this.messagesLostCache.set(received.key.id, received);
if (received.messageStubParameters && received.messageStubParameters[0] === 'Message absent from node') { if (received.messageStubParameters && received.messageStubParameters[0] === 'Message absent from node') {
this.logger.info('Recovering message lost'); this.logger.info('Recovering message lost');
@ -1070,12 +1068,12 @@ export class BaileysStartupService extends WAStartupService {
continue; continue;
} }
// const retryCache = (await this.messagesLostCache.get(received.key.id)) || null; const retryCache = (await this.messagesLostCache.get(received.key.id)) || null;
// if (retryCache) { if (retryCache) {
// this.logger.info('Recovered message lost'); this.logger.info('Recovered message lost');
// await this.messagesLostCache.delete(received.key.id); await this.messagesLostCache.delete(received.key.id);
// } }
if ( if (
(type !== 'notify' && type !== 'append') || (type !== 'notify' && type !== 'append') ||