Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
🚀 Feature: Comprehensive WhatsApp Message Templates Support for Polls, Events, and PIX Payments
This PR introduces extensive internationalization support for WhatsApp's advanced message types (polls, events, and PIX payments) across all supported locales in the Chatwoot integration, ensuring a consistent and localized user experience for global users.
📋 Overview
This feature branch implements a complete message template system that handles three new WhatsApp message types:
🔧 Technical Implementation
Core Changes
1. Message Consumer Enhancement (
src/apps/chatwoot/consumers/waha/message.any.ts)extractPixData()method to parse PIX payment information from WhatsApp payloads2. Template System Extension (
src/apps/chatwoot/i18n/templates.ts)WA_TO_CW_MESSAGE_POLL- Poll message templatesWA_TO_CW_MESSAGE_EVENT- Event message templatesWA_TO_CW_MESSAGE_PIX- PIX payment templatesInternationalization Scope
3. Multi-Language Support (16 Locales)
Extended message templates to all supported languages:
Total Impact: 1,106 lines added across 16 locale files
📝 Message Template Examples
Poll Messages
Event Messages
Location Messages (Enhanced)
PIX Payment Messages
🎯 Key Features
Poll Support
Event Support
PIX Payment Support
Location Message Enhancements
🔄 Development Workflow
Commit 1: Core implementation with Portuguese templates and message processing logic
Commit 2: Cleanup of temporary patch files
Commit 3: Full internationalization across all 16 supported locales
✅ Testing Considerations
🌍 Impact
This enhancement significantly improves the user experience for global Chatwoot users by providing:
The implementation maintains backward compatibility while extending the platform's capabilities to handle modern WhatsApp communication features.
📊 Commit Summary
696de948f1ae8c0901369e79Total: 23 files changed, 1,390 lines added
Screenshot of message templates:
Event template:

Template for PIX(BR):

Localization Template (Improvements):

I just hope you enjoy some of the code if it's useful.