tencent cloud

All product documents
Chat
JavaScript
Last updated: 2025-01-07 15:20:40
JavaScript
Last updated: 2025-01-07 15:20:40

Feature Overview

After a message is deleted successfully, its isDeleted is true. In one-to-one conversations, deleted messages cannot be pulled on the next login, but the receiver will not be affected. In group conversations, deleted messages cannot be pulled on the next login, but other group members will not be affected.
Note:
1. Up to 30 messages can be deleted at a time. If more than 30 messages are selected, the first 30 messages will be deleted.
2. Messages to be deleted must be from the same conversation, that is, the conversation of the first message in the message list.
3. This API can be called only once per second.
4. Deleted messages are not synced.
5. Messages cannot be deleted from audio-video groups (AVChatRoom), and if you call this API, the error code 10035 will be returned.
6. This API does not support deleting group system notifications.

UI Display


API
chat.deleteMessage(messageList);
Parameters
Name
Type
Description
messageList
Array
List of messages (up to 30) in the same conversation
Return value
Promise
Examples
let promise = chat.deleteMessage([message1, message2, message3, ...]);
promise.then(function(imResponse) {
// Messages deleted successfully
}).catch(function(imError) {
// Failed to delete the messages
console.warn('deleteMessage error:', imError);
});

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon