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
831 stars 254 forks source link

[Feature Request] Edit Text Message #241

Closed normalscene closed 3 months ago

normalscene commented 7 months ago

Is your feature request related to a problem? Please describe. I'm always frustrated when I am not able to edit a text message.

The problem is simple. Sometimes we don't want to delete the sent message but just edit it, as now whatsapp allows editing of messages.

Describe the solution you'd like

Say I have sent message and it has msgid=1234, i should be able to call api /editMessage(msgid, newtext) and the already sent message text should change from earlier text to newtext.

Additional context Add any other context or screenshots about the feature request here.

patron:PLUS

normalscene commented 4 months ago

Hi @allburov Hope all is well!

When do u see this feature coming to life ?

normalscene commented 4 months ago

Hi. Is there any update ?

patron:PLUS

allburov commented 3 months ago

Hi! Sorry for the delay, was busy with other things... The next thing in the queue, hopefully it'll be available soon :crossed_fingers:

devlikepro commented 3 months ago

Hi! You can edit and delete messages starting WAHA Plus 2024.3.11! :tada: Remember to update and restart your containers to use the feature.


Edit message

You can edit text messages or "caption" in media messages.

PUT /api/{session}/chats/{chatId}/messages/{messageId}

👉 Remember to escape @ in chatId and messageId with %40.

So if you want to edit true_123@c.us_AAA message in 123@c.us chat you need to send request to:

PUT /api/{session}/chats/123%40c.us/messages/true_123%40c.us_AAA

Payload:

{
  "text": "Hello, world!"
}

Delete message

You can delete messages from the chat.

DELETE /api/{session}/chats/{chatId}/messages/{messageId}

👉 Remember to escape @ in chatId and messageId with %40.

So if you want to delete true_123@c.us_AAA message in 123@c.us chat you need to send request to:

DELETE /api/{session}/chats/123%40c.us/messages/true_123%40c.us_AAA

patron:PRO