clearC2CHistoryMessage
Introduction
Clear all the history messages for a c2c conversation, chat with another specific user, on both local and remote server, without the deleting of conversation.
Please do not invoke this method, if not necessary to clear the message on server.
Parameter details
Parameter name | Parameter type | Required | Description |
---|---|---|---|
userID | string | yes | The ID of the user to clear history messages. |
Returned template
V2TimCallback
{
code : number
desc : string
}
Return value details
name | type | description |
---|---|---|
code | number | Request result: Error codes. 0 means success. |
desc | string | The description of the error. It will be empty if success. |
Code example
import { TencentImSDKPlugin } from 'react-native-tim-js';
const clearC2CHistoryMessageRes = await TencentImSDKPlugin.v2TIMManager
.getMessageManager()
.clearC2CHistoryMessage('userID');
if (clearC2CHistoryMessageRes.code === 0) {
}