-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Update whatsapp.business.service.ts #1403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Sticker and Location to Catch it is not available.
Reviewer's Guide by SourceryThe pull request updates the WhatsApp business service to correctly handle incoming sticker and location messages, which were previously not processed. It refactors message parsing logic to accommodate various message types, adds specific handling for stickers, and enhances error handling and logging in the event processing flow. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jeffryjdelarosa - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider refactoring
messageTextJson
to handle different message types (text, sticker, location, etc.) in separate helper functions for improved clarity. - The logic for identifying and handling different message types appears distributed across
messageTextJson
,messageHandle
, andeventHandler
; consider streamlining this.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟡 Security: 1 issue found
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
this.logger.log('Contenido recibido en eventHandler:'); | ||
this.logger.log(JSON.stringify(content, null, 2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 question (security): Beware of verbose logging.
Logging the entire content in JSON might expose sensitive information. Ensure such detailed logging is controlled by environment or a log level setting when in production.
buen trabajo podrias correr npm run lint porfavor |
Sticker and Location to Catch it is not available.
Summary by Sourcery
Add support for sticker and location messages and enhance message processing.
New Features:
Bug Fixes:
Enhancements: