Skip to content

Commit b3aeed7

Browse files
committed
fix: retry messages
1 parent 5ae5d85 commit b3aeed7

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/api/services/whatsapp/whatsapp.baileys.service.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,21 +1061,19 @@ export class BaileysStartupService extends WAStartupService {
10611061
}
10621062
}
10631063

1064-
await this.messagesLostCache.set(received.key.id, received);
1065-
10661064
if (received.messageStubParameters && received.messageStubParameters[0] === 'Message absent from node') {
10671065
this.logger.info('Recovering message lost');
10681066

10691067
await this.messagesLostCache.set(received.key.id, received);
10701068
continue;
10711069
}
10721070

1073-
// const retryCache = (await this.messagesLostCache.get(received.key.id)) || null;
1071+
const retryCache = (await this.messagesLostCache.get(received.key.id)) || null;
10741072

1075-
// if (retryCache) {
1076-
// this.logger.info('Recovered message lost');
1077-
// await this.messagesLostCache.delete(received.key.id);
1078-
// }
1073+
if (retryCache) {
1074+
this.logger.info('Recovered message lost');
1075+
await this.messagesLostCache.delete(received.key.id);
1076+
}
10791077

10801078
if (
10811079
(type !== 'notify' && type !== 'append') ||

0 commit comments

Comments
 (0)