fix(chatwoot): avoid "undefined" caption on group audio messages by edisonmartinsmkt · Pull Request #1434 · EvolutionAPI/evolution-api · GitHub
Skip to content

fix(chatwoot): avoid "undefined" caption on group audio messages#1434

Merged
DavidsonGomes merged 1 commit intoEvolutionAPI:developfrom
edisonmartinsmkt:fix/group-audio-caption
May 10, 2025
Merged

fix(chatwoot): avoid "undefined" caption on group audio messages#1434
DavidsonGomes merged 1 commit intoEvolutionAPI:developfrom
edisonmartinsmkt:fix/group-audio-caption

Conversation

@edisonmartinsmkt
Copy link
Copy Markdown
Contributor

@edisonmartinsmkt edisonmartinsmkt commented May 10, 2025

This PR fixes an issue where incoming audio messages in WhatsApp groups were displaying the text "undefined" as a caption in Chatwoot.

The change ensures that if no caption is present in the audioMessage, an empty string is sent instead — preventing the literal string "undefined" from appearing in the UI.

Before:
🟥 The word "undefined" was shown above the audio player when no caption existed.
image

After:
✅ No caption is displayed, keeping the interface clean.
image

Summary by Sourcery

Fix an issue with audio message captions in WhatsApp group messages by ensuring an empty string is used when no caption is present

Bug Fixes:

  • Resolved an issue where 'undefined' was displayed as a caption for audio messages in WhatsApp groups

Enhancements:

  • Updated caption handling for audio messages to prevent 'undefined' text from appearing in the UI

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 10, 2025

@DavidsonGomes DavidsonGomes changed the base branch from main to develop May 10, 2025 14:24
@DavidsonGomes DavidsonGomes merged commit 383bac0 into EvolutionAPI:develop May 10, 2025
1 check passed
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @edisonmartinsmkt - I've reviewed your changes - here's some feedback:

  • This PR's scope is much larger than the title suggests; consider separating the Chatwoot fix from new features like NATS, Business Catalog, and the security patch.
  • Given the security fix replacing execSync, consider a broader audit for similar shell command execution patterns in the codebase.
  • The significantly refactored raw SQL query in getChats warrants a performance review, especially with large datasets.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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