Read receipts
Read receipts show if channel members have viewed a message.
Required setup
Read Receipts requires Unread Message Count. First, set the last read timetoken for each user on a channel.
Get read receipts
streamReadReceipts() provides read status for messages on a channel. The method fetches member read status, listens for updates, and passes Receipt events to an asynchronous stream.
Not available for public chats
Read receipts are disabled in public chats.
Method signature
1channel.streamReadReceipts() -> AsyncStream<[Timetoken: [String]]>
Input
This method doesn't take any parameters.
Output
| Parameter | Description |
|---|---|
AsyncStream<[Timetoken: [String]]> | An asynchronous stream that emits a new read receipt confirmation whenever someone marks a message as read. |
Sample code
Sample code
The code samples in Swift Chat SDK focus on asynchronous code execution.
You can also write synchronous code as the parameters are shared between the async and sync methods but we don't provide usage examples of such.
Receive updates for read receipts on the support channel.
- AsyncStream
- Closure
1
1