Delete Messages
Delete message is a feature that is found in modern messaging apps that allows the user to delete the message once it is sent. Once you sent the message, you can able to delete the messages by using built-in SDK methods.
Delete for Me#
If you want to delete the messages for yourself only then you can use the below method.
Note: The messages will not be deleted from the recipient.
Method Params#
| Status | Description | Type | Required |
|---|---|---|---|
TO_JID | JID of the To User/Group | JID String | true |
MESSAGE_IDS | Array of To Message Ids | Array | true |
Response Format#
note
To learn more about deleteMessagesForMe call back, go to messageListener Section.
Delete for Everyone#
If you want to delete the messages for yourself and the receiver then you can use the below method. The messages will also be deleted from the recipient.
Method Params#
| Status | Description | Type | Required |
|---|---|---|---|
TO_JID | JID of the To User/Group | JID String | true |
MESSAGE_IDS | Array of To Message Ids | Array | true |
Response Format#
note
To learn more about deleteMessagesForEveryone call back, go to messageListener Section.
Clear Chat Messages#
The clear chat message is a feature that allows users to delete chat messages.
If you want to clear the messages for the entire chat, or multiple chats then you can utilize the below methods.
Clear Chat#
You can clear the messages for any chat by using the below method. The messages will not be deleted from the recipient.
Method Params#
| Status | Description | Type | Required |
|---|---|---|---|
TO_JID | JID of the To User/Group | JID String | true |
LAST_MSG_ID | lastMsgId which the message is send | String | false |
Response Format#
Delete Chat#
You can delete the chat (from recent chat) by using the below method.
Method Params#
| Status | Description | Type | Required |
|---|---|---|---|
TO_JID | JID of the To User/Group | JID String | true |