Skip to content

Conversation

@milesibastos
Copy link

This pull request introduces comprehensive support for WhatsApp group conversations. It updates both backend and frontend logic to correctly identify group chats, process group messages, and display sender names for individual messages within group conversations. The changes ensure that group messages are attributed to the correct sender and that group contacts are managed distinctly from individual contacts.

WhatsApp Group Conversation Detection and Processing:

  • Added helper functions (isWhatsAppGroupConversation, shouldShowSenderNames) to detect WhatsApp group conversations and determine when to show sender names in the frontend (app/javascript/dashboard/helper/groupConversationHelper.js).
  • Refactored backend message processing to distinguish between individual and group messages, ensuring correct contact and sender attribution for group messages (app/services/whatsapp/incoming_message_whatsapp_web_service.rb). This includes new methods for handling incoming/outgoing group messages and setting up group contacts. [1] [2] [3]
  • Improved validation for WhatsApp source IDs to support both group and individual JIDs for WhatsApp Web (app/models/contact_inbox.rb).

Frontend UI Enhancements for Group Conversations:

  • Updated message components to accept and utilize an isGroupConversation prop, enabling conditional display of sender names and avatars for group chats (Message.vue, MessageList.vue, MessagesView.vue). [1] [2] [3]
  • Enhanced message rendering logic to show sender names above bubbles in group conversations and adjusted grid layouts and avatar tooltips for better clarity (Message.vue). [1] [2] [3] [4] [5]

General Improvements and Refactoring:

  • Added a new delegate for contact_info to the WhatsApp channel model for easier access to group names (app/models/channel/whatsapp.rb).
  • Updated devcontainer configuration to include GitLens and improved formatting for forwarded ports (.devcontainer/devcontainer.json).

These changes collectively ensure robust handling and display of WhatsApp group conversations across the application.

milesibastos and others added 8 commits September 6, 2025 02:38
Resolves fundamental compatibility issues blocking WhatsApp group message support:

1. Fix WHATSAPP_GROUP_JID_REGEX to properly match group JIDs ([email protected] format)
2. Update ContactInbox validation to allow group JIDs for whatsapp_web provider
3. Fix message sanitization to preserve group JIDs during sending
4. Add comprehensive test coverage with 15 new tests

All existing functionality preserved with zero breaking changes.
Group JIDs only allowed for whatsapp_web provider for security.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants