Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

In case you want to delete a conversation, you can use the deleteConversation() method. This method takes two parameters. The unique id (UID/GUID) of the conversation to be deleted & the type (user/group) of conversation to be deleted.
// Delete user conversation
await CometChat.deleteConversation("UID", "user");

// Delete group conversation
await CometChat.deleteConversation("GUID", "group");

Note: Deletes only for the logged-in user. Use REST API to delete for all participants.
This operation is irreversible. Deleted conversations cannot be recovered for the logged-in user.
Use deleteConversation() to delete a conversation for the logged-in user.
let UID: string = "UID";
let type: string = "user";
CometChat.deleteConversation(UID, type).then(
  (deletedConversation: string) => {
      console.log(deletedConversation);
  }, (error: CometChat.CometChatException) => {
      console.log('error while deleting a conversation', error);
  }
);
This method deletes the conversation only for the logged-in user. To delete a conversation for all the users of the conversation, please refer to our REST API documentation here. The deleteConversation() method takes the following parameters:
ParameterDescriptionRequired
conversationWithUID or GUID of the conversation to deleteYes
conversationTypeuser or groupYes
On success, returns a confirmation message string.

Next Steps

Retrieve Conversations

Fetch and filter conversation lists

Delete Messages

Delete individual messages from conversations

Typing Indicators

Show when users are typing in conversations

Delivery & Read Receipts

Track message delivery and read status