@botbuildercommunity/middleware-activity-type
v1.0.1
Published
Bot Framework middleware component to handle incoming activities based on a specific activity type
Downloads
9
Readme
Activity Type Middleware
This middleware package is a Node.JS port of the C# Activity Type middleware component from the Bot Builder Community. It intercepts messages based on the activity type so that you can automatically handle certain types outside of the standard dialog flow.
Installing
npm install @botbuildercommunity/middleware-activity-type --save
Usage
import { HandleActivityType } from '@botbuildercommunity/middleware-activity-type';
adapter.use(new HandleActivityType(ActivityTypes.Message, async (context, next) => {
await context.sendActivity('Hello, middleware!');
}));