Skip to content

Commit 1ac869c

Browse files
committed
refactor: simplify carousel message generation in WhatsApp service
- Updated the carousel message generation to only require the 'cards' parameter, aligning with PAPI specifications. - Removed unnecessary parameters from the function call for cleaner code.
1 parent 295cb13 commit 1ac869c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3187,12 +3187,8 @@ export class BaileysStartupService extends ChannelStartupService {
31873187
footer: data.footer,
31883188
});
31893189

3190-
const carouselContent = generateCarouselMessage({
3191-
cards,
3192-
title: data.title,
3193-
body: data.body,
3194-
footer: data.footer,
3195-
});
3190+
// generateCarouselMessage aceita apenas { cards } (igual ao PAPI)
3191+
const carouselContent = generateCarouselMessage({ cards });
31963192

31973193
this.logger.verbose({ message: '[Carousel] Sending message via relayMessage...' });
31983194
this.logger.verbose({ message: '[Carousel] JID Original', jid: data.number });

0 commit comments

Comments
 (0)