Skip to main content

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)
}
})
ParameterTypeRequiredDescription
targetIdStringYesThe receiver's userId
conversationTypeNumberYesConversation type, refer to ConversationType.