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

Bug: fetchMessage Function Does Not Update Message ACK Status Properly #2777

Open
1 task done
elhumbertoz opened this issue Feb 17, 2024 · 1 comment
Open
1 task done
Labels
bug Something isn't working

Comments

@elhumbertoz
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When invoking the fetchMessage function in the whatsapp-web.js library to retrieve messages, it is observed that the ack property of the retrieved messages does not update correctly. The ack property should reflect the status of the message delivery confirmation, with numeric values according to the specification: ACK_ERROR: -1, ACK_PENDING: 0, ACK_SERVER: 1, ACK_DEVICE: 2, ACK_READ: 3, ACK_PLAYED: 4.

Expected behavior

We expect that when invoking fetchMessage and then marking the messages as read using the Chat.SendSeen function, the ack property of the messages updates correctly to ACK_READ (3) to reflect that they have been read.

Steps to Reproduce the Bug or Issue

  1. Receive a message from a user in a chat.
  2. Mark the chat as read using the Chat.SendSeen function.
  3. Retrieve the messages with the fetchMessage function.
  4. Check the value of the ack property of the retrieved messages.

Relevant Code

chat.sendSeen();
await chat.fetchMessages({limit: limit}).then(async(messages) => {
  messages = messages.filter(msg => msg.ack <= 2); //  It is not the ack property of the messages updated correctly to ACK_READ (3)

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

Linux, Phone Android, main whatsapp-web.js versión, Wathsapp: 2.2407.2

Additional context

No response

@elhumbertoz elhumbertoz added the bug Something isn't working label Feb 17, 2024
@N0N4M3BNS
Copy link

@elhumbertoz on your side still have the problem? because on my side, sometimes ACK is still not updated.

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

No branches or pull requests

2 participants