mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2026-01-09 21:32:20 -06:00
fix(chatwoot): resolve webhook timeout on deletion with 5+ images
Problem: - Chatwoot shows red error when deleting messages with 5+ images - Cause: Chatwoot webhook timeout of 5 seconds - Processing 5 images takes ~9 seconds - Duplicate webhooks arrive during processing Solution: - Implemented async processing with setImmediate() - Webhook responds immediately (< 100ms) - Deletion processes in background without blocking - Maintains idempotency with cache (1 hour TTL) - Maintains lock mechanism (60 seconds TTL) Benefits: - Scales infinitely (10, 20, 100+ images) - No timeout regardless of quantity - No error messages in Chatwoot - Reliable background processing Tested: - 5 images: 9s background processing - Webhook response: < 100ms - No red error in Chatwoot - Deletion completes successfully BREAKING CHANGE: Fixed assertSessions signature to accept force parameter
This commit is contained in:
@@ -4593,8 +4593,8 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
return response;
|
||||
}
|
||||
|
||||
public async baileysAssertSessions(jids: string[]) {
|
||||
const response = await this.client.assertSessions(jids);
|
||||
public async baileysAssertSessions(jids: string[], force?: boolean) {
|
||||
const response = await this.client.assertSessions(jids, force);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user