Closed NxP4Code closed 3 years ago
@NxP4Code You are reading documentation of Botkit V0, but comparing it to the latest version of this library. Watson Botkit middleware 1.* was compatible with Botkit V0 and it called next() in https://github.com/watson-developer-cloud/botkit-middleware/blob/v1/lib/middleware/index.js#L69-L91
Up to date documentation is at https://botkit.ai/docs/v4/core.html#middlewares
Yes, I noticed V1 of middleware had next() support. It was my mistake that I pasted the link of the BotKit V0 link. Even in V4 BotKit suggest that the signature of middleware should be in the following form
It seems next() is not called in the receive function. Per botKit documentation Next() should be called at the end of receive function to process all middleware stack.
https://botkit.ai/docs/v0/middleware.html#hear-middleware