tencent cloud

All product documents
Chat
Last updated: 2024-01-31 16:20:43
Unity
Last updated: 2024-01-31 16:20:43

Feature Description

One-to-one messages and group messages can be cleared. When messages in a conversation are cleared, all the messages in the conversation will be cleared both locally and from the cloud, but the conversation itself will not be deleted.
Note:
Do not use this API if you do not want to clear messages from the cloud.
If the last message is deleted, the lastMessage in the conversation will become the last but one message.

Clearing one-to-one messages

Call MsgClearHistoryMessage (Details) to clear one-to-one messages.
Sample code:
TIMResult res = TencentIMSDK.MsgClearHistoryMessage(conv_id, TIMConvType.kTIMConv_C2C, (int code, string desc, string user_data) => {
// Process the callback logic
});

Clearing group messages

Call MsgClearHistoryMessage (Details) to clear group messages.
Sample code:
TIMResult res = TencentIMSDK.MsgClearHistoryMessage(conv_id, TIMConvType.kTIMConv_Group, (int code, string desc, string user_data) => {
// Process the callback logic
});
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