Delete Message
Description
Section titled “Description”wss message_delete
The message_delete
request deletes multiple messages in a conversation. Also can delete for current user or for all users in a conversation.
Request Parameters
Section titled “Request Parameters”Name | Type | Description |
---|---|---|
ids | string | Array of messages that need to be deleted |
cid | string | Conversation ID where messages are located |
type | string | myself or all |
Response Fields
Section titled “Response Fields”{ "id": "RequestId", "success": true}
Example
Section titled “Example”{ "request": { "message_delete": { "cid": "63077ad836b78c3d82af0812", "ids": ["63077ad836b78c3d82af0812", "63077ad836b78c3d82af0813"], "type": "myself" | "all" }, "id": "RequestId" }}
If use “all”, then other users in this conversation who is online will receive the following message:
{ "message_delete": { "cid": "63077ad836b78c3d82af0812", "ids": ["63077ad836b78c3d82af0812", "63077ad836b78c3d82af0813"], "type": "all", "from": "634ec51c0b65918393dca5bf" }}
If users are offline, they will receive a message once became online.
See Also
Section titled “See Also” SAMA chat server API: Messages Based on ease of use, and with easy-to-understand documentation and articles on how to set up and use our APIs, we want to show that it is REAL to build communication into your application.