-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix: adjusting cloud api send audio and video #1287
Conversation
Reviewer's Guide by SourceryThis pull request addresses issues with sending audio and video messages via the cloud API. It prevents sending the filename for video messages, corrects the media parameter for audio messages, and simplifies the audio processing logic. Sequence diagram for sending video messagesequenceDiagram
participant Client
participant BusinessStartupService
participant WhatsAppAPI
Client->>BusinessStartupService: Send video message (media, mimetype, fileName)
BusinessStartupService->>BusinessStartupService: Check if media is video
BusinessStartupService->>WhatsAppAPI: Send media ID, preview_url, caption (no filename if video)
WhatsAppAPI-->>BusinessStartupService: Success/Failure
BusinessStartupService-->>Client: Success/Failure
File-Level Changes
Possibly linked issues
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 @pedroepif - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a comment explaining why
filename
should not be sent for videos. - The
// DO NOTHING
comment can be removed.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 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.
The documentation to send video: https://developers.facebook.com/docs/whatsapp/cloud-api/messages/video-messages |
Please fix the lint, use |
Done |
This commit fix sending video and audio in cloud api service:
Summary by Sourcery
Fixes issues with sending audio and video in the Cloud API service. Specifically, it ensures that video messages do not include the filename parameter and corrects the parameters used when sending audio messages.
Bug Fixes: