ibm-early-programs / node-red-contrib-facebook-messenger-writer

Writer Node for Facebook Messenger
Apache License 2.0
1 stars 8 forks source link

Support rich message objects #12

Closed geoffklee closed 6 years ago

geoffklee commented 6 years ago

Hi - this a quick patch I wrote so that I could pass a whole message object to this node, rather than just text. This allows for setting of the 'quick_replies' attribute, for example, which can be quite useful.

The original behaviour of accepting text is preserved, so this should be a non-breaking change.

CLAassistant commented 6 years ago

CLA assistant check
All committers have signed the CLA.

chughts commented 6 years ago

I am allowing this, although if not used correctly there is a possibility that the check msg.payload.text may crash the flow it is used in.

geoffklee commented 6 years ago

Thanks! I'd be happy to make the patch more robust, if you have suggestions. I'm fairly new to javascript and node-red