whatsapp-web.js
whatsapp-web.js copied to clipboard
Media message in the channel has hasMedia: false
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
When receiving the message with media in the channel, the Message object has hasMedia property equal to false, also the mediaKey equals null, but the type property equals image.
Expected behavior
hasMedia should be true and the other related props should not be null
Steps to Reproduce the Bug or Issue
- subscribe to a channel with WhatsApp app
- subscribe to message events with whatsapp-web.js
- send an image to the WhatsApp channel you subscribed
Relevant Code
Here is an example of a Message object I receive:
[
'_data' => [
...
'body' => '/9j/4AAQSkZJRgABAQA.....P//+AAMA/9k='
'type' => 'image'
'directPath' => '/m1/v/t24/An9rC4V34.....&_nc_sid=5e03e0'
'mimetype' => 'image/jpeg'
'filehash' => 'rYozqfT03uvcbamYnqPIwYNCuycw4yTEEnLRAvK5Y1Y='
'size' => 126282
'mediaKey' => null
'mediaKeyTimestamp' => null
...
],
...
'mediaKey' => null
'id' => [
'fromMe' => false
'remote' => '1203632.....36578@newsletter'
'id' => '3A74858C......B1F12'
'_serialized' => 'false_120363.....6578@newsletter_3A74858C.....B1F12'
]
'ack' => 1
'hasMedia' => false
'body' => '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDABsSFBcU....rqe0IzNTP//+AAMA/9k='
'type' => 'image'
...
]
Browser Type
Chromium
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
OS: Linux Phone OS: iOS whatsapp-web.js version: webpack-exodus WhatsApp Web version: 2.3000.1012737330 Node: 17.0.1
Additional context
No response