Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 773 Bytes

File metadata and controls

17 lines (11 loc) · 773 Bytes

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