whatsapp-http-api icon indicating copy to clipboard operation
whatsapp-http-api copied to clipboard

[Feature Request] Improving the status sending feature

Open oteGroupMoishy opened this issue 9 months ago • 6 comments

Some improvements we need to buy the PRO version:

Now when sending a status, the status is not visible on the sender's phone And there is no option to delete a status

We would be happy if it would be possible to fix it, so that when you send a status, it will also be seen on the sender's device And also that the option of deleting a status will be added.

Another thing that is important to us, before purchasing the PRO is the possibility of retrieving the views of the status, which means that I can receive in a GET request all the viewers of the status that I sent.

oteGroupMoishy avatar May 06 '24 13:05 oteGroupMoishy

HI We are in the process of developing a system We would be happy to receive information if our requests are possible, and if it is possible to meet to discuss cooperation between us

Thanks in advance for reference

oteGroupMoishy avatar May 08 '24 11:05 oteGroupMoishy

Hi! So, to make it visible on your device you need to include your own account in the contacts list

{
  "contacts": [
    "[email protected]",
    "[email protected]"
  ],
  "text": "Have a look! https://waha.devlike.pro/",
  "backgroundColor": "#38b42f",
  "font": 1
}

After that you can view "views" and delete status from the phone.

patron:PRO

allburov avatar May 08 '24 11:05 allburov

To get the views you need to

  1. When POST /api/.../status - save the id field in your database from the response
{
  "key": {
    "remoteJid": "status@broadcast",
    "fromMe": true,
    "id": "BAE56029F4DE08A0"   <============= THIS ONE
  },
  1. Listen message.ack events and save those in your database related to the ID above - only for "ackName": "READ" https://waha.devlike.pro/docs/how-to/webhooks/#messageack
{
  "event": "message.ack",
  "session": "session_0d81yj",
  "me": {
    "id": "[email protected]",
    "pushName": "WAHA"
  },
  "payload": {
    "id": "[email protected]_123123",
    "from": "[email protected]",
    "to": "[email protected]",
    "participant": "[email protected]",
    "fromMe": true,
    "ack": 3,
    "ackName": "READ"
  },
  "engine": "NOWEB",
  "environment": {
    "version": "2024.5.4",
    "engine": "NOWEB",
    "tier": "PLUS",
    "browser": "/usr/bin/google-chrome-stable"
  }
}

NOWEB engine right now doesn't offer that, due to lack of actual "database". Now, when we support MongoDB achieving it looks possible, so at the end we should have something like /api/messages/{ID}/acks statistics (because the status is actually just a special message)

No ETA on that tho, it's faster to implement it in the your application code right now

patron:PRO

allburov avatar May 08 '24 11:05 allburov

For DELETE status - yes, right now it's not possible, but we could look at this.

It's better to create a dedicated issue for each request left:

  1. Delete status (shouldn't take much time, no certain ETA tho)
  2. Get views (a bit harder, but we need to know how many people would love to have it and prioritize it properly)

Let me know if you have any questions!

patron:PRO

allburov avatar May 08 '24 11:05 allburov

to discuss cooperation between us

Sure, you can send a message here: [email protected]

patron:PRO

allburov avatar May 08 '24 11:05 allburov

HI thank you for the answer Regarding receiving status view data I tried, and a webhook is received only for the first view, no webhook is received for the other views

oteGroupMoishy avatar May 08 '24 13:05 oteGroupMoishy

the status is not visible on the sender's phone

Fixed in 2024.6.3, no needs to add your id to contacts list

I tried, and a webhook is received only for the first view, no webhook is received for the other views

Fixed in https://github.com/devlikeapro/waha/issues/329#issuecomment-2122728190

patron:PRO

devlikepro avatar Jun 14 '24 07:06 devlikepro