IConversations.UpdateActivityAsync(IActivity, CancellationToken) Method

Definition

UpdateActivity.

public System.Threading.Tasks.Task<Microsoft.Agents.Core.Models.ResourceResponse> UpdateActivityAsync(Microsoft.Agents.Core.Models.IActivity activity, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateActivityAsync : Microsoft.Agents.Core.Models.IActivity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.Core.Models.ResourceResponse>
Public Function UpdateActivityAsync (activity As IActivity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parameters

activity
IActivity

replacement Activity.

cancellationToken
CancellationToken

The cancellation token.

Returns

A task that represents the ResourceResponse.

Remarks

Edit an existing activity.

Some channels allow you to edit an existing activity to reflect the new state of an Agent conversation.

For example, you can remove buttons after someone has clicked "Approve" button.

Applies to