Skip to content

Commit

Permalink
chore: Update group metadata cache on participants update
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dgcode-tec committed Jun 26, 2024
1 parent d0eee79 commit 75922e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/services/channels/whatsapp.baileys.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,8 @@ export class BaileysStartupService extends ChannelStartupService {
action: ParticipantAction;
}) => {
this.sendDataWebhook(Events.GROUP_PARTICIPANTS_UPDATE, participantsUpdate);

this.updateGroupMetadataCache(participantsUpdate.id);
},
};

Expand Down

0 comments on commit 75922e6

Please sign in to comment.