actions-on-google / codelabs-nodejs

Actions on Google Codelabs
https://codelabs.developers.google.com/?cat=Assistant
Apache License 2.0
264 stars 187 forks source link

Issue with storing username (level 3) #64

Open jgege opened 4 years ago

jgege commented 4 years ago

I started the tutorial on level 3. As the description said, I used the code from folder level2-complete but I ran into an issue at step 5: the assistant couldn't remember my name. When I deployed the code from level3-complete it was working alright. So after some debugging, I realised that it is probably because in the level2-complete code the user's name is stored in conv.data.userName (which wasn't working) while in level3-complete it was in conv.user.storage.userName (works alright). The name is also always retrieved from the latter in the rest of the code.

Level 2 https://github.com/actions-on-google/codelabs-nodejs/blob/master/level2-complete/functions/index.js#L81

Level 3 https://github.com/actions-on-google/codelabs-nodejs/blob/master/level3-complete/functions/index.js#L121