Unread messages
Confused about "Unread messages"?
Let us know how we can improve our documentation:
Users can have unread messages in a channel because new messages arrived while they were away, or because they explictly marked a message as unread.
Marking a message as unread
Copied!Confused about "Marking a message as unread"?
Let us know how we can improve our documentation:
You can mark a message as unread from client-side:
Or from server-side by providing a user id:
For performance reasons it's only possible to mark any of the last 100 messages of the channel as unread.
Marking a channel as read
Copied!Confused about "Marking a channel as read "?
Let us know how we can improve our documentation:
You can mark all messages in a channel as read like this on the client-side:
Or from server-side by providing a user id:
Last read message
Copied!Confused about "Last read message"?
Let us know how we can improve our documentation:
The last_read_message_id
field tells which was the last read message that a given user read in the channel.
Read state
Copied!Confused about "Read state"?
Let us know how we can improve our documentation:
When you retrieve a channel from the API (e.g. using query channels), the read state for all members is included in the response.
The read state includes the number of unread messages, the last read message id, and when the user read the channel. An example:
The last read message id is updated in the following events:
message.read
notification.mark_read
notification.mark_unread
Jump to last read message
Copied!Confused about "Jump to last read message"?
Let us know how we can improve our documentation:
This is how you can jump to the last read message inside a given channel:
Control read state exposure
Copied!Confused about "Control read state exposure "?
Let us know how we can improve our documentation:
Please take in account that user's read state exposure can be controlled by user privacy settings:
If privacy_settings.read_receipts.enabled
is set to false
, then the read state of this user will not be exposed to others. Additionally, read state related events, such as message.read and notification.mark_read, will not be delivered to others when this user reads messages.