Jaa


ConversationsExtensions.ReplyToActivityAsync Method

Definition

Overloads

ReplyToActivityAsync(IConversations, Activity, CancellationToken)
ReplyToActivityAsync(IConversations, Activity, CancellationToken)

Reply to an activity in an existing conversation.

ReplyToActivityAsync(IConversations, String, String, Activity, CancellationToken)
ReplyToActivityAsync(IConversations, String, String, Activity, CancellationToken)

ReplyToActivity.

ReplyToActivityAsync(IConversations, Activity, CancellationToken)

public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse> ReplyToActivityAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Connector.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member ReplyToActivityAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Connector.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse>
<Extension()>
Public Function ReplyToActivityAsync (operations As IConversations, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parameters

operations
IConversations
activity
Activity
cancellationToken
CancellationToken

Returns

Applies to

ReplyToActivityAsync(IConversations, Activity, CancellationToken)

Reply to an activity in an existing conversation.

public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> ReplyToActivityAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member ReplyToActivityAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function ReplyToActivityAsync (operations As IConversations, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parameters

operations
IConversations

The operations group for this extension method.

activity
Activity

Activity to send.

cancellationToken
CancellationToken

The cancellation token.

Returns

A Task representing the asynchronous operation.

Applies to

ReplyToActivityAsync(IConversations, String, String, Activity, CancellationToken)

public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse> ReplyToActivityAsync (this Microsoft.Bot.Connector.IConversations operations, string conversationId, string activityId, Microsoft.Bot.Connector.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member ReplyToActivityAsync : Microsoft.Bot.Connector.IConversations * string * string * Microsoft.Bot.Connector.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse>
<Extension()>
Public Function ReplyToActivityAsync (operations As IConversations, conversationId As String, activityId As String, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parameters

operations
IConversations
conversationId
String
activityId
String
activity
Activity
cancellationToken
CancellationToken

Returns

Applies to

ReplyToActivityAsync(IConversations, String, String, Activity, CancellationToken)

ReplyToActivity.

public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> ReplyToActivityAsync (this Microsoft.Bot.Connector.IConversations operations, string conversationId, string activityId, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member ReplyToActivityAsync : Microsoft.Bot.Connector.IConversations * string * string * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function ReplyToActivityAsync (operations As IConversations, conversationId As String, activityId As String, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parameters

operations
IConversations

The operations group for this extension method.

conversationId
String

Conversation ID.

activityId
String

activityId the reply is to (OPTIONAL).

activity
Activity

Activity to send.

cancellationToken
CancellationToken

The cancellation token.

Returns

The ResourceResponse.

Remarks

This method allows you to reply to an activity.

This is slightly different from SendToConversation(). * SendToConversation(conversationId) - will append the activity to the end of the conversation according to the timestamp or semantics of the channel. * ReplyToActivity(conversationId,ActivityId) - adds the activity as a reply to another activity, if the channel supports it. If the channel does not support nested replies, ReplyToActivity falls back to SendToConversation.

Use ReplyToActivity when replying to a specific activity in the conversation.

Use SendToConversation in all other cases.

Applies to