NotificationMessagesClient.SendReadReceiptAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| SendReadReceiptAsync(ReadReceiptContent, CancellationToken) |
Sends a read receipt update from Business to User. |
| SendReadReceiptAsync(RequestContent, RequestContext) |
[Protocol Method] Sends a read receipt update from Business to User.
|
SendReadReceiptAsync(ReadReceiptContent, CancellationToken)
Sends a read receipt update from Business to User.
public virtual System.Threading.Tasks.Task<Azure.Response> SendReadReceiptAsync(Azure.Communication.Messages.ReadReceiptContent readReceiptContent, System.Threading.CancellationToken cancellationToken = default);
abstract member SendReadReceiptAsync : Azure.Communication.Messages.ReadReceiptContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.SendReadReceiptAsync : Azure.Communication.Messages.ReadReceiptContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function SendReadReceiptAsync (readReceiptContent As ReadReceiptContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)
Parameters
- readReceiptContent
- ReadReceiptContent
Details of the read receipt update to send.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
readReceiptContent is null.
Examples
This sample shows how to call SendReadReceiptAsync.
NotificationMessagesClient client = new NotificationMessagesClient(null);
ReadReceiptContent readReceiptContent = new ReadReceiptContent("320fc2a1-4c4b-4387-9c1a-bd38b57795de", Guid.Parse("0f0eb78e-a576-1dfc-b414-0f0756de3338"))
{
TypingIndicator = true,
};
Response response = await client.SendReadReceiptAsync(readReceiptContent);
Applies to
SendReadReceiptAsync(RequestContent, RequestContext)
[Protocol Method] Sends a read receipt update from Business to User.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler SendReadReceiptAsync(ReadReceiptContent, CancellationToken) convenience overload with strongly typed models first.
public virtual System.Threading.Tasks.Task<Azure.Response> SendReadReceiptAsync(Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member SendReadReceiptAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.SendReadReceiptAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function SendReadReceiptAsync (content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)
Parameters
- content
- RequestContent
The content to send as the body of the request.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
content is null.
Service returned a non-success status code.
Examples
This sample shows how to call SendReadReceiptAsync.
NotificationMessagesClient client = new NotificationMessagesClient(null);
using RequestContent content = RequestContent.Create(new
{
channelRegistrationId = "0f0eb78e-a576-1dfc-b414-0f0756de3338",
messageId = "320fc2a1-4c4b-4387-9c1a-bd38b57795de",
typingIndicator = true,
});
Response response = await client.SendReadReceiptAsync(content);
Console.WriteLine(response.Status);