OneBusAway / onebusaway-alexa

An Java-based app to communicate with Amazon Alexa for devices such as the Amazon Echo
Other
52 stars 18 forks source link

Trying to update stop ID with or without values resets skill #39

Closed barbeau closed 8 years ago

barbeau commented 8 years ago

Steps to reproduce:

  1. Go through the initial bootstrap of setting up your city and stop number
  2. Say "Alexa, ask OneBusAway to set my stop"
  3. Say your new stop number when prompted

or:

  1. Go through the initial bootstrap of setting up your city and stop number
  2. Say "Alexa, ask OneBusAway to set my stop to X"

What happens:

Alexa says "Welcome to OneBusAway! Let's set you up..."

What I expect:

My stop number should be updated, and Alexa should confirm with "Ok, your stop number is %s in the %s region...".

Cause:

Looks like this happens because we're expecting the CITY_NAME session variable to be set in setStopNumber(), as in the initial bootstrap flow. But, when we're coming in via onIntent() for SetStopNumberIntent without an existing session, we don't have this session variable set. So, looks like we need to check the persisted user record for an existing CITY_NAME. This blurs the line a bit between the Anon and AuthedSpeechlets, and we need to figure out the best way to handle it.

@philipmw Thoughts?

barbeau commented 8 years ago

I was working on this a bit last night, I'll push something later tonight.