ConversationClient.SendReplyChainActivityAsync 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.
Sends an activity as a reply in a reply chain (thread).
Posts to /v3/conversations/{conversationId}/replyChains/{activityId}.
public virtual System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse?> SendReplyChainActivityAsync(string conversationId, string activityId, Microsoft.Teams.Core.Schema.CoreActivityInput activity, 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 SendReplyChainActivityAsync : string * string * Microsoft.Teams.Core.Schema.CoreActivityInput * Uri * bool * Microsoft.Teams.Core.Http.BotRequestContext * System.Collections.Generic.Dictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse>
override this.SendReplyChainActivityAsync : string * string * Microsoft.Teams.Core.Schema.CoreActivityInput * Uri * bool * Microsoft.Teams.Core.Http.BotRequestContext * System.Collections.Generic.Dictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse>
Public Overridable Function SendReplyChainActivityAsync (conversationId As String, activityId As String, activity As CoreActivityInput, 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(Of SendActivityResponse)
Parameters
- conversationId
- String
The id of the chat or channel: channelData.chat.id or channelData.channel.id, not conversation.id. Cannot be null or whitespace.
- activityId
- String
The id of the message at the root of the reply chain: channelData.replyChain.id. Cannot be null or whitespace.
- activity
- CoreActivityInput
The activity to send. Cannot be null.
- serviceUrl
- Uri
The service URL for the conversation. Cannot be null.
- isTargeted
- Boolean
When true, the activity is sent as a targeted message visible only to the specified recipient.
- 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 send operation.
Returns
A task that represents the asynchronous operation. The task result contains the response with the ID of the sent activity.
Exceptions
Thrown if conversationId or activityId is blank, or is the dot segment . or ...
Thrown if the activity could not be sent successfully.