A middleware function that participates in the turn processing pipeline.
Add cross-cutting logic (e.g. logging, telemetry) that runs before or after each activity is handled. Call next() to continue to the next middleware or handler.
next()
const logging: TurnMiddleware = async (context, next) => { console.log('activity type:', context.activity.type) await next()}bot.use(logging) Copy
const logging: TurnMiddleware = async (context, next) => { console.log('activity type:', context.activity.type) await next()}bot.use(logging)
A middleware function that participates in the turn processing pipeline.
Add cross-cutting logic (e.g. logging, telemetry) that runs before or after each activity is handled. Call
next()to continue to the next middleware or handler.