Direct channel read receipt
Send a read receipt
When user A sends a message to user B, and B sends a read receipt, A receives a notification through the read receipt handler.
Call channel.sendReadReceiptResponse() to send a read receipt for messages in a direct channel.
Method
Dart
Future<int> sendReadReceiptResponse(List<String> messageIds, ErrorHandler handler)
Parameters
| Parameter | Type | Description |
|---|---|---|
messageIds | List<String> | Server-assigned unique IDs of the messages to acknowledge. |
handler | ErrorHandler | Event callback. |
Code example
Dart
final channel = DirectChannel('<target-user-id>');
await channel.sendReadReceiptResponse(
['<message-uid>'],
(error) {
if (error == null) {
print('Read receipt sent');
}
},
);
Listen for read receipt events
info
The MessageHandler callback for direct channel read receipts is not yet exposed in the Flutter wrapper. This section will be updated when the API is available.