Skip to content
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

Media message in the channel has hasMedia: false #2952

Open
1 task done
TheMacros opened this issue Apr 13, 2024 · 0 comments · May be fixed by #2620
Open
1 task done

Media message in the channel has hasMedia: false #2952

TheMacros opened this issue Apr 13, 2024 · 0 comments · May be fixed by #2620
Labels
bug Something isn't working

Comments

@TheMacros
Copy link

Is there an existing issue for this?

  • 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

  1. subscribe to a channel with WhatsApp app
  2. subscribe to message events with whatsapp-web.js
  3. 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

@TheMacros TheMacros added the bug Something isn't working label Apr 13, 2024
alechkos added a commit to alechkos/whatsapp-web.js that referenced this issue Apr 30, 2024
alechkos added a commit to alechkos/whatsapp-web.js that referenced this issue Apr 30, 2024
@alechkos alechkos linked a pull request Apr 30, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant