Hubot Adapter for Discourse

So something strange is going on with babble’s handling of replying via the API. Here’s a rundown:

The “emitting robot action” log there is in his script. Hubot adapters work by “hearing” messages that emit messages to a user’s script to handle them (Containing such logic as hearing “hello” I want to reply with “oh hi there”). The script has hooks to “reply” or “respond” again using the adapter’s say or reply method.

Those methods in my adapter simply hook into the Discourse posts.json API endpoint here:

https://github.com/featheredtoast/hubot-discourse-adapter/blob/master/src/discourse.coffee#L142

“reply” uses the reply_to_post_number parameter, which works great for standard topics, but appears to not get handled well in Babble land.

2 Likes