feat(whatsapp): add media send/receive support#2010
feat(whatsapp): add media send/receive support#2010Zeknes wants to merge 8 commits intoHKUDS:mainfrom
Conversation
c5279fa to
6394abf
Compare
- Bridge: download voice messages (audioMessage) - Bridge: add sendMedia() method for image/audio/video/document - Python: parse media tags and send via WebSocket - Server: handle send_media command No message deduplication logic included.
- Merge sendMedia() into sendMessage() with optional parameters - Simplify server.ts interface (remove send_media command) - Python channel auto-detects media tags and sends unified payload - Backward compatible: sendMedia() deprecated but still works Design aligned with Feishu channel pattern.
- Verified all media types: image, audio, video, document - Unified sendMessage() API working correctly - Caption extraction from media tags functional
- Add react_emoji config option (optional, default null)
- Auto-send reaction when receiving messages (like Feishu bot)
- Bridge: handle send_reaction command
- WhatsApp Client: sendReaction() using Baileys API
Configuration:
channels:
whatsapp:
react_emoji: "👍" # Set emoji or null to disable
- Document reactEmoji option in WhatsApp configuration - Show default value (👍) and how to disable (null) - Add configuration options table for clarity
7523727 to
fd71fb8
Compare
|
@Re-bin hello, I have been using these changes daily, works fine, ready for review, would appreciate any feedback |
|
I will check this soon ;) thanks! |
|
@Zeknes I would suggest removing the thumb-up react feature, as Whatsapp already has its receipt mechanism, this is especially the case for users who talk to their own number, and every other person who talks to you would also have their messages thumbed up including your own, which is quite some distraction |
You can set it to "" to disable the feature, this should only work on bot count logged in on nanobot. |
Resolved conflicts: - bridge/src/server.ts: kept reaction support + added send_media command - nanobot/channels/whatsapp.py: merged media sending, reactions, and group_policy
🎯 Purpose
Add WhatsApp media send/receive support (images, audio, video, documents).
✨ Features
🏗️ Architecture
📝 Files Modified
.gitignorebridge/src/server.tsbridge/src/whatsapp.tsnanobot/channels/whatsapp.py✅ Testing
Tested all media types:
Commit History (3 commits, rebased on latest upstream):