devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click!
https://waha.devlike.pro/
Apache License 2.0
813 stars 248 forks source link

[Feature Request] Improving the status sending feature #320

Closed oteGroupMoishy closed 2 weeks ago

oteGroupMoishy commented 1 month ago

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 commented 1 month ago

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

allburov commented 1 month ago

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

{
  "contacts": [
    "123123@c.us",
    "youraccount@c.us"
  ],
  "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 commented 1 month ago

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
    },
  2. 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": "123@c.us",
    "pushName": "WAHA"
    },
    "payload": {
    "id": "true_status@c.us_123123",
    "from": "status@c.us",
    "to": "status@c.us",
    "participant": "123123@c.us",
    "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 commented 1 month ago

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 commented 1 month ago

to discuss cooperation between us

Sure, you can send a message here: waha@devlike.pro

patron:PRO

oteGroupMoishy commented 1 month ago

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

devlikepro commented 2 weeks ago

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