Quick Reference
deleteConversation() method.
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.
- To User
- To Group
- TypeScript (User)
- TypeScript (Group)
deleteConversation() method takes the following parameters:
| 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 |
Best Practices
Best Practices
- Always confirm with the user before deleting a conversation, as this action is irreversible for the logged-in user.
- Handle the error callback gracefully to inform users if the deletion fails (e.g., due to network issues or invalid IDs).
- After a successful deletion, update your local conversation list by refreshing it using
ConversationsRequest.
Troubleshooting
Troubleshooting
- Conversation not found: Ensure the
UIDorGUIDyou are passing is correct and that a conversation with that user or group exists. - Permission denied: Verify that the logged-in user has the appropriate permissions and that the SDK is initialized and the user is logged in.
- Type mismatch: Make sure the
conversationTypeparameter matches the ID you are passing — use"user"with aUIDand"group"with aGUID.
Next Steps
Retrieve Conversations
Fetch and display the list of conversations for the logged-in user.
Delete a Message
Remove individual messages from a conversation.
Receive Messages
Listen for and handle incoming real-time messages.
Messaging Overview
Explore the full set of messaging capabilities available in the SDK.