unreadCount
will be set to 0
, and the content of lastMessage
will be cleared as well.chat.clearHistoryMessage(conversationID);
Name | Type | Description |
conversationID | String | Conversation ID, in the format of: C2C${userID} (for one-to-one chats)GROUP{groupID} (for group chats) |
Promise
// Clear one-to-one messages locally and from the cloudlet promise = chat.clearHistoryMessage('C2CExample');promise.then(function(imResponse) {// Messages cleared successfully}).catch(function(imError){console.warn('clearHistoryMessage error:', imError); // Message clearing failure information});
// Clear group messages locally and from the cloudlet promise = chat.clearHistoryMessage('GROUPExample');promise.then(function(imResponse) {// Messages cleared successfully}).catch(function(imError){console.warn('clearHistoryMessage error:', imError); // Message clearing failure information});
Was this page helpful?