TeamsActivityHandler.OnTeamsMessagingExtensionQueryAsync 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.
Invoked when a Messaging Extension Query activity is received from the connector.
protected virtual System.Threading.Tasks.Task<Microsoft.Bot.Schema.Teams.MessagingExtensionResponse> OnTeamsMessagingExtensionQueryAsync (Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IInvokeActivity> turnContext, Microsoft.Bot.Schema.Teams.MessagingExtensionQuery query, System.Threading.CancellationToken cancellationToken);
abstract member OnTeamsMessagingExtensionQueryAsync : Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IInvokeActivity> * Microsoft.Bot.Schema.Teams.MessagingExtensionQuery * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.Teams.MessagingExtensionResponse>
override this.OnTeamsMessagingExtensionQueryAsync : Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IInvokeActivity> * Microsoft.Bot.Schema.Teams.MessagingExtensionQuery * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.Teams.MessagingExtensionResponse>
Protected Overridable Function OnTeamsMessagingExtensionQueryAsync (turnContext As ITurnContext(Of IInvokeActivity), query As MessagingExtensionQuery, cancellationToken As CancellationToken) As Task(Of MessagingExtensionResponse)
Parameters
- turnContext
- ITurnContext<IInvokeActivity>
A strongly-typed context object for this turn.
- query
- MessagingExtensionQuery
The query for the search command.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
The Messaging Extension Response for the query.