TeamsBotApplication.Reply 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
| Name | Description |
|---|---|
| Reply(String, String, TeamsActivity, AgenticIdentity, CancellationToken) |
Obsolete.
Sends an activity proactively as a reply in a reply chain (thread).
Posts to the reply chain (thread) of the message |
| Reply(String, String, String, AgenticIdentity, CancellationToken) |
Obsolete.
Sends a text message proactively as a reply in a reply chain (thread).
Posts to the reply chain (thread) of the message |
Reply(String, String, TeamsActivity, AgenticIdentity, CancellationToken)
Caution
Use ReplyAsync with a TeamsActivityInput built via new MessageActivityInput() instead.
Sends an activity proactively as a reply in a reply chain (thread).
Posts to the reply chain (thread) of the message messageId, in the chat or channel conversationId.
When the activity carries a recipient marked as targeted (IsTargeted), it is sent as a targeted message visible only to that recipient.
[System.Obsolete("Use ReplyAsync with a TeamsActivityInput built via new MessageActivityInput() instead.")]
public System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse?> Reply(string conversationId, string messageId, Microsoft.Teams.Apps.Schema.TeamsActivity activity, Microsoft.Teams.Core.Schema.AgenticIdentity? agenticIdentity = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Obsolete("Use ReplyAsync with a TeamsActivityInput built via new MessageActivityInput() instead.")>]
member this.Reply : string * string * Microsoft.Teams.Apps.Schema.TeamsActivity * Microsoft.Teams.Core.Schema.AgenticIdentity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse>
Public Function Reply (conversationId As String, messageId As String, activity As TeamsActivity, Optional agenticIdentity As AgenticIdentity = 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.
- messageId
- String
The id of the message at the root of the reply chain: channelData.replyChain.id.
- activity
- TeamsActivity
The activity to send.
- agenticIdentity
- AgenticIdentity
The agentic identity for user-delegated token acquisition. Extract from the inbound activity's Recipient via GetAgenticIdentity().
- cancellationToken
- CancellationToken
A cancellation token.
Returns
The response from the send operation.
- Attributes
Applies to
Reply(String, String, String, AgenticIdentity, CancellationToken)
Caution
Use ReplyAsync instead.
Sends a text message proactively as a reply in a reply chain (thread).
Posts to the reply chain (thread) of the message messageId, in the chat or channel conversationId.
[System.Obsolete("Use ReplyAsync instead.")]
public System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse?> Reply(string conversationId, string messageId, string text, Microsoft.Teams.Core.Schema.AgenticIdentity? agenticIdentity = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Obsolete("Use ReplyAsync instead.")>]
member this.Reply : string * string * string * Microsoft.Teams.Core.Schema.AgenticIdentity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse>
Public Function Reply (conversationId As String, messageId As String, text As String, Optional agenticIdentity As AgenticIdentity = 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.
- messageId
- String
The id of the message at the root of the reply chain: channelData.replyChain.id.
- text
- String
The text to send.
- agenticIdentity
- AgenticIdentity
The agentic identity for user-delegated token acquisition. Extract from the inbound activity's Recipient via GetAgenticIdentity().
- cancellationToken
- CancellationToken
A cancellation token.
Returns
The response from the send operation.
- Attributes