deleteConversation

Introduction

Delete conversation

Users can choose to delete a conversation, after deleting the contact of leaving the group, that do not need to view the conversation it self anymore.

The multi-device synchronization for deleting the conversation is disabled by default, you can enable it on the console.

It will delete the record on both device and server, and can not recovered anymore.

The message will be deleted on server side after deleting on the device.

Parameter details

Parameter name Parameter type Required Description
conversationID string yes The ID of the conversation to delete.

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 deleteConversationRes = await TencentImSDKPlugin.v2TIMManager
    .getConversationManager()
    .deleteConversation(
        ''
    );
if (deleteConversationRes.code === 0) {

}

results matching ""

    No results matching ""