From 75922e603bba23fb99842b134ddcfff8b48226f7 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Wed, 26 Jun 2024 15:23:06 -0300 Subject: [PATCH] chore: Update group metadata cache on participants update Refactored WhatsappBaileysService to update group metadata cache when a participants update event is triggered. This will improve the accuracy of the group metadata and ensure that it stays up-to-date with the latest changes in the group. Modified: - src/api/services/channels/whatsapp.baileys.service.ts --- src/api/services/channels/whatsapp.baileys.service.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/services/channels/whatsapp.baileys.service.ts b/src/api/services/channels/whatsapp.baileys.service.ts index 889b9724..bdb45d0a 100644 --- a/src/api/services/channels/whatsapp.baileys.service.ts +++ b/src/api/services/channels/whatsapp.baileys.service.ts @@ -1413,6 +1413,8 @@ export class BaileysStartupService extends ChannelStartupService { action: ParticipantAction; }) => { this.sendDataWebhook(Events.GROUP_PARTICIPANTS_UPDATE, participantsUpdate); + + this.updateGroupMetadataCache(participantsUpdate.id); }, };