ProtecteddefaultProtectedReturns the default next event handler. This method creates a function that calls the default handler.
The turn context for the current turn of conversation
A function that calls the default handler
ProtecteddispatchProtectedDispatches the ConversationUpdate activity. This method dispatches conversation update activities to the appropriate handlers.
The turn context for the current turn of conversation
ProtecteddispatchProtectedDispatches the Event activity. This method dispatches event activities to the appropriate handlers.
The turn context for the current turn of conversation
ProtecteddispatchProtectedDispatches the MessageDelete activity. This method dispatches message delete activities to the appropriate handlers.
The turn context for the current turn of conversation
ProtecteddispatchProtectedDispatches the MessageReaction activity. This method dispatches message reaction activities to the appropriate handlers.
The turn context for the current turn of conversation
ProtecteddispatchProtectedDispatches the MessageUpdate activity. This method dispatches message update activities to the appropriate handlers.
The turn context for the current turn of conversation
ProtectedhandleProtectedExecutes the handlers for a specific activity type. This method calls each registered handler for the specified activity type.
The turn context for the current turn of conversation
The activity type to handle
The function to call when all handlers have been executed
The value returned by the last handler
ProtectedonProtectedRegisters a handler for a specific activity type. This method adds a handler to the list of handlers for a specific activity type.
The activity type to register the handler for
The handler to register
The current instance for method chaining
ProtectedonProtectedHandles the AdaptiveCardInvoke activity. This method processes adaptive card invoke activities.
The turn context for the current turn of conversation
The adaptive card invoke value
A promise that resolves to an adaptive card invoke response
Registers a handler for the ConversationUpdate activity type. This is called when the conversation is updated, such as when members are added or removed.
The handler to register
The current instance for method chaining
ProtectedonProtectedHandles the ConversationUpdate activity. This method processes conversation update activities.
The turn context for the current turn of conversation
Registers an activity event handler for the dialog event, emitted as the last event for an incoming activity. This handler is called after all other handlers have been processed.
The handler to register
The current instance for method chaining
Registers a handler for the EndOfConversation activity type. This is called when the conversation ends.
The handler to register
The current instance for method chaining
ProtectedonProtectedHandles the EndOfConversation activity. This method processes end of conversation activities.
The turn context for the current turn of conversation
Registers a handler for the InstallationUpdate activity type. This is called when an agent is installed or uninstalled.
The handler to register
The current instance for method chaining
ProtectedonProtectedHandles the InstallationUpdate activity. This method processes installation update activities.
The turn context for the current turn of conversation
Registers a handler for the InstallationUpdateAdd activity type. This is called when an agent is installed or upgraded.
The handler to register
The current instance for method chaining
Registers a handler for the InstallationUpdateRemove activity type. This is called when an agent is uninstalled or downgraded.
The handler to register
The current instance for method chaining
ProtectedonProtectedHandles the Invoke activity. This method processes various invoke activities based on their name.
The turn context for the current turn of conversation
An invoke response object with status and body
Registers a handler for the MembersAdded activity type. This is called when new members are added to the conversation.
The handler to register
The current instance for method chaining
Registers a handler for the MembersRemoved activity type. This is called when members are removed from the conversation.
The handler to register
The current instance for method chaining
Registers a handler for the Message activity type. This is called when a message is received from the user.
The handler to register
The current instance for method chaining
ProtectedonProtectedHandles the Message activity. This method processes incoming message activities.
The turn context for the current turn of conversation
Registers a handler for the MessageDelete activity type. This is called when a message is deleted.
The handler to register
The current instance for method chaining
ProtectedonProtectedHandles the MessageDelete activity. This method processes message deletion activities.
The turn context for the current turn of conversation
Registers a handler for the MessageReaction activity type. This is called when reactions are added or removed from messages.
The handler to register
The current instance for method chaining
ProtectedonProtectedHandles the MessageReaction activity. This method processes message reaction activities.
The turn context for the current turn of conversation
Registers a handler for the MessageUpdate activity type. This is called when a message is updated.
The handler to register
The current instance for method chaining
ProtectedonProtectedHandles the MessageUpdate activity. This method processes message update activities.
The turn context for the current turn of conversation
Registers a handler for the ReactionsAdded activity type. This is called when reactions are added to messages.
The handler to register
The current instance for method chaining
Registers a handler for the ReactionsRemoved activity type. This is called when reactions are removed from messages.
The handler to register
The current instance for method chaining
ProtectedonProtectedHandles the SearchInvoke activity. This method processes search invoke activities.
The turn context for the current turn of conversation
The search invoke value
A promise that resolves to a search invoke response
Registers a handler for the SignInInvoke activity type. This is called when a sign-in is requested.
The handler to register
The current instance for method chaining
ProtectedonProtectedHandles the SignInInvoke activity. This method processes sign-in invoke activities.
The turn context for the current turn of conversation
Registers a handler for the Turn activity type. This is called for all activities regardless of type.
The handler to register
The current instance for method chaining
ProtectedonProtectedHandles the Turn activity. This method is called for every activity type and dispatches to the appropriate handler.
The turn context for the current turn of conversation
Registers a handler for the Typing activity type. This is called when a typing indicator is received.
The handler to register
The current instance for method chaining
ProtectedonProtectedHandles the Typing activity. This method processes typing indicator activities.
The turn context for the current turn of conversation
ProtectedonProtectedHandles unrecognized activity types. This method processes activities with unrecognized types.
The turn context for the current turn of conversation
Registers a handler for unrecognized activity types. This is called when an activity type is not recognized.
The handler to register
The current instance for method chaining
Runs the activity handler pipeline. This method is called to process an incoming activity through the registered handlers.
The turn context for the current turn of conversation
Protected StaticcreateProtectedCreates an InvokeResponse object. This static method creates an invoke response with the specified body.
Optionalbody: anyThe body of the response
An invoke response object with status and body
Handles incoming activities from channels and dispatches them to the appropriate handlers.
Remarks
This class is provided to simplify the migration from Bot Framework SDK v4 to the Agents Hosting framework.
The ActivityHandler serves as the central hub for processing incoming activities in conversational AI applications. It provides a comprehensive framework for handling various activity types including messages, conversation updates, message reactions, typing indicators, installation updates, and invoke operations such as adaptive cards and search.
Key Features:
Usage:
Developers can extend this class to implement domain-specific logic, override default behaviors, or add support for custom activity types and invoke operations.