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
This commit is contained in:
Davidson Gomes 2024-06-26 15:23:06 -03:00
parent d0eee796ba
commit 75922e603b

View File

@ -1413,6 +1413,8 @@ export class BaileysStartupService extends ChannelStartupService {
action: ParticipantAction;
}) => {
this.sendDataWebhook(Events.GROUP_PARTICIPANTS_UPDATE, participantsUpdate);
this.updateGroupMetadataCache(participantsUpdate.id);
},
};