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 MeIf 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 ParamsStatus | Description | Type | Required |
---|---|---|---|
TO_JID | JID of the To User/Group | JID String | true |
MESSAGE_IDS | Array of To Message Ids | Array | true |
#
Response Formatnote
To learn more about deleteMessagesForMe call back, go to messageListener Section.
#
Delete for EveryoneIf 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 ParamsStatus | Description | Type | Required |
---|---|---|---|
TO_JID | JID of the To User/Group | JID String | true |
MESSAGE_IDS | Array of To Message Ids | Array | true |
#
Response Formatnote
To learn more about deleteMessagesForEveryone call back, go to messageListener Section.
#
Clear Chat MessagesThe 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 ChatYou can clear the messages for any chat by using the below method. The messages will not be deleted from the recipient.
#
Method ParamsStatus | 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 ChatYou can delete the chat (from recent chat) by using the below method.
#
Method ParamsStatus | Description | Type | Required |
---|---|---|---|
TO_JID | JID of the To User/Group | JID String | true |