actions-on-google-nodejs icon indicating copy to clipboard operation
actions-on-google-nodejs copied to clipboard

user storage in follow-up intent issue

Open konradowy opened this issue 6 years ago • 2 comments

User.storage is half-working... I can save a value in some intents, and then read the value from user.storage in Default Welcome Intent, and other intents, despite of follow-up intent of Default Welcome Intent. User.storage there is undefined.

  • [Default Welcome Intent] - conv.user.storage.saved == 'value1'; // reading works here
  • [Default Welcome Intent - yes] - conv.user.storage.saved == undefined; // lost the value in 'yes' follow-up intent
  • [SomeOtherIntent] - conv.user.storage.saved = 'value1'; // saving value

And yes, I know that there are situations (like voice match is set up and there is no match, The user disabled personal data) where storage is cleared, but not in my case.

package.json: "actions-on-google": "^2.10.0", "firebase-admin": "^8.3.0", "firebase-functions": "^3.2.0",

konradowy avatar Aug 01 '19 14:08 konradowy

Are you defining the follow-up entirely in the Dialogflow console? Does conv.data also get lost?

Fleker avatar Aug 01 '19 17:08 Fleker

  1. Yes
  2. No.

Ok small update: this is not related to follow-up only, but all intents. user.storage is set only in the opening (DWI) and then is undefined between intents.

The workaround for me is to set conv.data with user.storage in the begining and then passing by between intents.

konradowy avatar Aug 02 '19 13:08 konradowy