Closed TotallyInformation closed 7 years ago
@TotallyInformation ok basically the feature requests are two
var context = msg.chat();
context.get('my_key');
context.set('another_key', 42);
return msg;
And yes there's some missing documentation here https://github.com/guidone/node-red-contrib-chatbot/wiki/Chat-Context I'll improve it.
Context node
like the default Change node
. It's a pretty complex node, and I think it's not strategic for the chatbot ecosystem right now (compared to extending the support for Facebook Messenger or Telegram payments for example).
I rather try a way to extend the Change node
in order to accept different contexts (in addition to msg, context, flow) rather than duplicate the functionality of it just for the chat context.
Perhaps there's a way to extend the node or propose a PR to the Node-Red guys, I'll look into it
The Context node should be able to set a context variable based on the input message for when the bot is initiating a conversation (e.g. from a web interface or alert). It should use the same capabilities as the Node-RED native change node (e.g. msg.xxxx, global, flow, JSONata).