github/hubot — pull request #803 by michaelansel (2014-10-25 02:28:46+00:00)
Title: Middleware

Builds on #801 (57b722022807b9a5befaafcab2442ad3a03d455b) to allow injecting arbitrary code between the Listener match and execute steps. Like in Express, middleware can interrupt the response process, preventing the Listener callback from ever being executed. Middleware can perform operations both on the way towards the Listener callback (before callback execution) and on the way away from the Listener callback (after callback execution/middleware interrupt).

As a side effect, listeners are now executed asynchronously. Behavior around message.done should remain the same (process until message.done is true).