keep session open

This commit is contained in:
GotPPay
2018-01-18 21:50:26 +01:00
parent 48badce0f0
commit 6bfd4adcaf

View File

@@ -31,13 +31,15 @@ module.exports = {
handlers = {};
handlers = {
LaunchRequest: function () {
this.response.speak (activeSkill.invocationAnswer);
this.response.listen (activeSkill.invocationAnswer);// Using listen so session doesn't end
//TODO : Maybe to ask user does he want to hear possible intents
//For this functionality, we need explanation text for each intent (Question)
this.emit (':responseReady');
},
};
activeSkill.intents.map (intent => {
handlers[intent.intentName] = function () {
this.response.speak (intent.answer);
this.response.listen (intent.answer); //Using listen so session doesn't end
this.emit (':responseReady');
};
});