1.0.1 • Published 5 years ago

@botbuildercommunity/middleware-activity-type v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

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!');
}));