UserStorage issue
Closed this issue · 2 comments
diedezp commented
Hi there,
First off, this library is brilliant! I did encounter an error however when trying to use conv.google.user.user_storage. When I tried the helloonsei script and I trigger the 'GetBerlinPicture' intent, the first IF statement is always the one that triggers. If I check the console on the AoG simulator the state seems to have been set but the response remains the first option. My test below also always returns 'I don't know you':
@agent.handle('Storage')
def welcome(conv: V2DialogflowConversation) -> V2DialogflowConversation:
if not conv.google.user.user_storage.get('ID'):
conv.google.ask('I dont know you')
uid = uuid.uuid4()
conv.google.user.user_storage['ID'] = str(uid)
elif conv.google.user.user_storage.get('ID') is not None:
userid = conv.google.user.user_storage.get('ID')
conv.google.ask('Welcome back!')
else:
conv.google.ask('I cant recognize you')
return conv
Thanks in advance