Skip to main content

Documentation Index

Fetch the complete documentation index at: https://cometchat-22654f5b-docs-android-v6-beta2.mintlify.app/llms.txt

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

// Delete a user conversation
await CometChat.deleteConversation(
  "UID",
  CometChatConversationType.user,
  onSuccess: (String message) => debugPrint("Deleted: $message"),
  onError: (CometChatException e) => debugPrint("Error: ${e.message}"),
);

// Delete a group conversation
await CometChat.deleteConversation(
  "GUID",
  CometChatConversationType.group,
  onSuccess: (String message) => debugPrint("Deleted: $message"),
  onError: (CometChatException e) => debugPrint("Error: ${e.message}"),
);
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. All messages in the conversation will be removed from the user’s view.
Use deleteConversation() to delete a conversation for the logged-in user.
Available via: SDK | REST API | UI Kits
This method takes two parameters: the unique id (UID/GUID) of the conversation to be deleted and the type (user/group) of conversation to be deleted.
String conversationWith = "UID";
String conversationType = CometChatConversationType.user;
await CometChat.deleteConversation(conversationWith, conversationType,
   onSuccess: (String str){
     debugPrint("Conversation deleted successfully at : $str");
   },
   onError: (CometChatException e){
     debugPrint("Conversation deletion failed : ${e.message}");
  	}
);
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 the REST API documentation.
ParameterTypeDescriptionRequired
conversationWithStringUID of the user or GUID of the group whose conversation you want to delete.Yes
conversationTypeStringThe type of conversation to delete. Use CometChatConversationType.user or CometChatConversationType.group.Yes
On Success — A String message confirming the conversation was deleted:
ParameterTypeDescriptionSample Value
messagestringSuccess confirmation message"cometchat-uid-1_user_cometchat-uid-2 deleted successfully"
ParameterTypeDescriptionSample Value
codestringError code identifier"ERR_CHAT_API_FAILURE"
messagestringHuman-readable error message"Failed to delete the conversation."
detailsstringAdditional technical details"The specified conversation could not be found or deleted."

Next Steps

Retrieve Conversations

Fetch and filter conversation lists

Delete Messages

Delete individual messages from conversations

Receive Messages

Listen for incoming messages in real-time

Typing Indicators

Show when users are typing in conversations