SDK
- Homepage: https://github.com/Microsoft/BotBuilder
- SDK Platform: Node.js
- SDK Version: 3.14.0
Issue Description
Hi, I searched for this for a long time now but I haven't found an answer. I was wondering if there is a way to bind some URL parameters to the User's Bot Session. For example, if for a specific chat dialog, I set my Endpoint URL to:
http://localhost:3978/api/messages?pronuntiation=british
is there a way to get that url parameter named "pronuntiation" down in the session object like...
bot.dialog("/", function(session){
var desiredPronuntiation = session.someUrlParameters.pronuntiation;
if( desiredPronuntiation == "british"){
///blah
}
});
I think it is possible in C# SDK but I was trying to do this in NodeJS...
I already debugged the proces from the server.post('/api/messages', connector.listen()) down to the ChatConnector.verifyBotFramework() where at the end I found it calls _this.dispatch(req.body, res, next); (ChatbotConnector.js on line 149) passing only the post body but not the request object itself...
So at a first glance I think this is not possible, I just wanted to be sure that I didn't miss anything... Thanks, Luis
session.privateConversationData. For subsequent visit by the user, get the locale info fromsession.privateConversationData. You can also save insession.userData, etc... docs.microsoft.com/en-us/bot-framework/nodejs/… - Master Chief