Mark Messages as Read
Description
Section titled “Description”wss message_read
The message_read
request marks messages as read on the server and notifies other online users about this.
Request Parameters
Section titled “Request Parameters”Name | Type | Description |
---|---|---|
cid | string | Conversation ID where messages are located |
ids | array[string] | Array of messages that need to be marked |
If
ids
is omit, we mark all unread messages as read. Response Fields
Section titled “Response Fields”{ "id": "RequestId", "success": true}
Example
Section titled “Example”{ "request": { "message_read": { "cid": "63077ad836b78c3d82af0812", "ids": ["63480e68f4794709f802a2fa", "63077ad836b78c3d82af0866"] }, "id": "RequestId" }}
Conversation type
c
do not support read status. Then, all the users whose messages we read will receive the following message:
{ "message_read": { "cid": "63077ad836b78c3d82af0812", "ids": ["63480e68f4794709f802a2fa", "63077ad836b78c3d82af0866"], "from": "634ec51c0b65918393dca5bf" }}
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.
DataBase Records Collection of complete objects stored in the database.