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

[feature] ability to delete message via api #209

Closed
ehussain opened this issue Sep 18, 2023 · 1 comment
Closed

[feature] ability to delete message via api #209

ehussain opened this issue Sep 18, 2023 · 1 comment

Comments

@ehussain
Copy link

Hello,

We are looking for API where we can delete the outgoing messages.

We receive a delete webhook for messages sent by client (any incoming message), however there is no way to delete the message which is sent from us via api.

We can have option to delete by message_id, and signature can look like this.

[DELETE] /message
{"id": "false_xxx@xx"} 
@allburov allburov added enhancement New feature or request engine:WEBJS labels Sep 19, 2023
@allburov allburov added dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Jan 7, 2024
@devlikepro
Copy link
Contributor

Hi!
You can edit and delete messages starting WAHA Plus 2024.3.11! 🎉
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants