dialogflow-fulfillment-nodejs icon indicating copy to clipboard operation
dialogflow-fulfillment-nodejs copied to clipboard

Update contexts.js

Open ZwitsaI opened this issue 6 years ago • 3 comments

Change _processV2InputContexts(v2InputContexts) function: Extract name not from fixed 6th position,

const name = context['name'].split('/')[6];

but from last in the split

let name = context['name'].split('/'); name = name[name.length-1];

In requests that come in to the draft version contain the context name on the 6th/last position "name": "projects/project-name/agent/sessions/ABwppplpq8QomdH91Z8YeWbZM1vvK04Ty6-2NEwAe5-Ur3Nc9GUAt3fyguV0YavLfQBNlLhYUFGQY35Gxm913Iefk/contexts/userdata"

In alpha test it's not the 6th but it's still the last position. "name": "projects/project-name/agent/environments/__aog-30/users/-/sessions/ABwppHERR9ORcqJ4vEVSu1XxN3xTolEN7Pq1fUXhOBNaker5yA8ljmI9Wnp8uOZ2rdVVAS4s9Twxa-tjAH45X495K/contexts/userdata"

ZwitsaI avatar Nov 19 '19 12:11 ZwitsaI

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

googlebot avatar Nov 19 '19 12:11 googlebot

@googlebot I signed it!

ZwitsaI avatar Nov 22 '19 09:11 ZwitsaI

Any progress on this ?

willpomac avatar Jul 27 '20 00:07 willpomac