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.

// Delete user conversation
CometChat.deleteConversation("UID", CometChatConstants.RECEIVER_TYPE_USER,
    object : CallbackListener<String>() {
        override fun onSuccess(message: String) { }
        override fun onError(e: CometChatException) { }
    })

// Delete group conversation
CometChat.deleteConversation("GUID", CometChatConstants.RECEIVER_TYPE_GROUP, callback)
Note: This deletes the conversation only for the logged-in user. To delete for all users, use the REST API.
Use deleteConversation() to delete a conversation for the logged-in user.
ParameterDescriptionRequired
conversationWithUID of the user or GUID of the group whose conversation you want to delete.YES
conversationTypeThe type of conversation you want to delete . It can be either user or group.YES
CometChat.deleteConversation(UID, CometChatConstants.RECEIVER_TYPE_USER, new CometChat.CallbackListener<String>() {
  @Override
  public void onSuccess(String s) {
    Log.d(TAG, s);
  }

  @Override
  public void onError(CometChatException e) {
    Log.d(TAG, e.getMessage());
  }
});
This deletes the conversation only for the logged-in user. To delete for all participants, use the REST API.

Next Steps

Retrieve Conversations

Fetch list of conversations

Block Users

Block users to prevent messages

Leave Group

Leave group conversations

Delete Messages

Delete individual messages