ConversationsExtensions.UpdateActivityAsync 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
UpdateActivityAsync(IConversations, Activity, CancellationToken)
public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse> UpdateActivityAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Connector.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member UpdateActivityAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Connector.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse>
<Extension()>
Public Function UpdateActivityAsync (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
UpdateActivityAsync(IConversations, Activity, CancellationToken)
Update an activity in an existing conversation.
public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> UpdateActivityAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member UpdateActivityAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function UpdateActivityAsync (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 update.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A Task representing the asynchronous operation.
Applies to
UpdateActivityAsync(IConversations, String, String, Activity, CancellationToken)
public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse> UpdateActivityAsync (this Microsoft.Bot.Connector.IConversations operations, string conversationId, string activityId, Microsoft.Bot.Connector.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member UpdateActivityAsync : Microsoft.Bot.Connector.IConversations * string * string * Microsoft.Bot.Connector.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse>
<Extension()>
Public Function UpdateActivityAsync (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
UpdateActivityAsync(IConversations, String, String, Activity, CancellationToken)
UpdateActivity.
public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> UpdateActivityAsync (this Microsoft.Bot.Connector.IConversations operations, string conversationId, string activityId, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member UpdateActivityAsync : Microsoft.Bot.Connector.IConversations * string * string * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function UpdateActivityAsync (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 to update.
- activity
- Activity
replacement Activity.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
The ResourceResponse.
Remarks
Edit an existing activity.
Some channels allow you to edit an existing activity to reflect the new state of a bot conversation.
For example, you can remove buttons after someone has clicked "Approve" button.