Delete Conversation
Delete a Specific Conversation
Call removeConversation to delete a specific conversation.
const conversationType = RongIMLib.ConversationType.PRIVATE;
const targetId = 'Receiver's userId';
RongIMLib.removeConversation({
conversationType,
targetId: targetId,
}).then(res => {
// Successfully deleted the specific conversation
if(res.code === 0){
console.log(res.code)
} else {
console.log(res.code, res.msg)
}
})
Parameter | Type | Required | Description |
---|---|---|---|
targetId | String | Yes | The receiver's userId |
conversationType | Number | Yes | Conversation type, refer to ConversationType. |