Language

ConversationClient.DeleteActivityAsync Method

Definition

Deletes an existing activity from a conversation.

public virtual System.Threading.Tasks.Task DeleteActivityAsync(string conversationId, string activityId, Uri serviceUrl, bool isTargeted = false, Microsoft.Teams.Core.Http.BotRequestContext? requestContext = default, System.Collections.Generic.Dictionary<string,string>? customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteActivityAsync : string * string * Uri * bool * Microsoft.Teams.Core.Http.BotRequestContext * System.Collections.Generic.Dictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.DeleteActivityAsync : string * string * Uri * bool * Microsoft.Teams.Core.Http.BotRequestContext * System.Collections.Generic.Dictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function DeleteActivityAsync (conversationId As String, activityId As String, serviceUrl As Uri, Optional isTargeted As Boolean = false, Optional requestContext As BotRequestContext = Nothing, Optional customHeaders As Dictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

conversationId
String

The ID of the conversation. Cannot be null or whitespace.

activityId
String

The ID of the activity to delete. Cannot be null or whitespace.

serviceUrl
Uri

The service URL for the conversation. Cannot be null.

isTargeted
Boolean

If true, deletes a targeted activity.

requestContext
BotRequestContext

Optional per-request properties (see BotRequestContext) to stamp onto the request's options.

customHeaders
Dictionary<String,String>

Optional custom headers to include in the request.

cancellationToken
CancellationToken

A cancellation token that can be used to cancel the delete operation.

Returns

A task that represents the asynchronous operation.

Exceptions

Thrown if the activity could not be deleted successfully.

Applies to