chen-ye / hubot-fb

A Hubot adapter for the Facebook Messenger Platform
https://www.npmjs.com/package/hubot-fb
87 stars 21 forks source link

Allow users to emit messages #16

Open nsand opened 8 years ago

nsand commented 8 years ago

The slack adapter has a convenient way of posting attachments using the robot emitter. I thought this might be nice for hubot-fb to have something similar for posting richer messages. Following this pattern, I added an event listener for fb.message, which requires a payload with an envelope field (corresponding to the response envelope) and the message, which could be an object with an attachment. I've updated the README with usage information.

Let me know what you think. Thanks!

chen-ye commented 8 years ago

oh good idea! I'll review this this weekend