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.
AI Integration Quick Reference
// 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.
| Parameter | Description | Required |
|---|
| conversationWith | UID of the user or GUID of the group whose conversation you want to delete. | YES |
| conversationType | The type of conversation you want to delete . It can be either user or group. | YES |
Java (User)
Java (Group)
Kotlin (User)
Kotlin (Group)
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());
}
});
CometChat.deleteConversation(GUID, CometChatConstants.RECEIVER_TYPE_GROUP, 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());
}
});
CometChat.deleteConversation(UID, CometChatConstants.RECEIVER_TYPE_USER, object : CallbackListener<String?>() {
override fun onSuccess(s: String?) {
Log.d(TAG, s)
}
override fun onError(e: CometChatException) {
Log.d(TAG, e.message)
}
})
CometChat.deleteConversation(GUID, CometChatConstants.RECEIVER_TYPE_GROUP, object : CallbackListener<String?>() {
override fun onSuccess(s: String?) {
Log.d(TAG, s)
}
override fun onError(e: CometChatException) {
Log.d(TAG, e.message)
}
})
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