devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click! Two engines: chromium-based WEBJS and pure-websocket NOWEB
https://waha.devlike.pro/
Apache License 2.0
1.01k stars 306 forks source link

[BUG][NOWEB] - sendSeen doesn't work correctly #635

Open gamoridev opened 1 week ago

gamoridev commented 1 week ago

Send seen and Message Ack Properties

Even sending the /sendSeen to this message, the properties ack remains null and ackName "UNKNOWN". This seems strange because reading from WhatsApp App, the property changes correctly. Also, on the WhatsApp app, the message is checked with blue checkmark after sending the POST. image

  {
    "id": "[REDACTED]",
    "timestamp": 1731347646,
    "from": "[REDACTED]",
    "fromMe": false,
    "body": "teste",
    "hasMedia": false,
    "ack": null,
    "ackName": "UNKNOWN",
    "replyTo": {
      "body": null
    },
  }

patron:PLUS

devlikepro commented 1 week ago

Hi! I've tested it with the latest 2024.11.4 version, NOWEB engine

  1. Connected Account1 to WAHA
  2. Send a message from Acccount2 to Account1
  3. Receive it via webhook
  4. Send POST api/sendSeen with data (below) from Account1
  5. See double green ticks on Account2 on the phone

There's no "double green ticks" on recipient side as I can see - this is why "fromMe": false," messages have "UNKNOWN" ack. Only fromMe: True has it

let me know if there's some additional steps or conditions you're referening too!

patron:PRO

devlikepro commented 1 week ago

the message is checked with blue checkmark after sending the POST.

Oh, I see, so the only issue in ack flag? yeah, that's how whatsapp apps work - it doesn't track "incoming" ack, so we do not either (we could track, but it won't work for history you get from phone)

patron:PRO

gamoridev commented 1 week ago

I didn't understand 🤔

Whats the difference of "acking" from Waha and reading the message from WhatsApp? Why does only reading from WhatsApp change the "ackName" to "READ"?

@devlikepro

patron:PLUS

gamoridev commented 1 week ago

I just want something to differ the "acked" message when I fetch messages again. Looks like there's nothing on the message object that changes when I send the ack POST, however it changes the blue check marks on WhatsApp App, that sounds strange.

patron:PLUS

devlikepro commented 1 week ago

Oh, you're right it DOES change the status when you do read it for a incoming message in the app :thinking: Will check that, thank you for the details!

patron:PRO

devlikepro commented 1 week ago

The main problem I see - when you'll "repair" (scan qr) the account - it doesn't have ack for messages :( We'll check what we can do here so when you logout and login again you can start processing only missed messages (if it's possible)

patron:PRO