alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.12k stars 736 forks source link

Fix: responseBuilder.reprompt() clears APLA reprompt directives #695

Closed volkipp closed 2 years ago

volkipp commented 3 years ago

Description

If using an APLA reprompt directive by calling addDirectiveToReprompt(), a future call to reprompt() removes all reprompt directives.

Motivation and Context

It should not matter the order in which reprompt() and addDirectiveToReprompt() are called through the ResponseBuilder. This is related to the recent addition of #694

Testing

I updated the ResponseBuilder tests to contain both a reprompt outputSpeech as well as a directive. The order of the function calls in the tests are addDirectiveTooReprompt() first, then reprompt()

Screenshots (if appropriate)

Types of changes

Checklist

License

volkipp commented 3 years ago

Great! I'm glad I could help. Hope you'll have a release soon. :) -Kipp