Therefore, add the logic that you want in your override. There's no base implementation for these handlers. To implement your logic for Teams specific activity handlers, you must override the methods in your bot as shown in the bot logic section. OnConversationUpdateActivityAsync routes all conversation update activities and OnInvokeActivityAsync routes all Teams invoke activities. In the Teams activity handler class, there are two primary Teams activity handlers, OnConversationUpdateActivityAsync and OnInvokeActivityAsync. If no events are found, it then passes them along to the Bot Framework's activity handler. The Teams activity handler first checks for any Teams specific events. If the bot receives a conversation update activity, then the turn handler receives a notification of that incoming activity and sends the incoming activity to OnConversationUpdateActivityAsync. In Teams, this functionality remains the same. The turn handler then sends the incoming activity to the OnMessageActivityAsync activity handler. If the bots receive a message activity, then the turn handler receives a notification of that incoming activity. The Teams bot is derived from TeamsActivityHandler class, which is derived from the Bot Framework's ActivityHandler class.īots are created using the Bot Framework. The turn handler calls the required activity handler to manage any activity received. All activities are routed through one base handler called the turn handler. When a bot for Teams receives an activity, it's routed to the activity handlers. It routes all Teams activities before allowing any non-Teams specific activities to be handled. Teams activity handler is derived from Microsoft Bot Framework's activity handler. The bot object contains the conversational reasoning or logic for a turn and exposes a turn handler, which is the method that can accept incoming activities from the bot adapter. The Teams activity handler adds support for Teams-specific events and interactions. Activities are handled in two ways using Teams activity handlers and bot logic. To organize the conversational logic for your bot, an activity handler is used. The primary difference between bots developed for Microsoft Teams and the core Bot Framework is in the features provided in Teams. This document builds on the article on how bots work in the core Bot Framework documentation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |