Open Nicky31 opened 5 years ago
Hi! Thanks for this!
If I'm understanding you correctly, the correct fix for this is to apply that (making sure there's no outputSpeech
in the underlying Alexa response) in the situation where there's a Dialog.Delegate directive to rely only on model dialogs.
If that's the case, it sounds to me like that's a great case to add this into the codebase itself, with the appropriate logic to make sure we only remove outputSpeech
in that specific scenario.
Any interest in contributing a pull request?
Hi, After taking a look at your codebase to fix this point, I've figured out outputSpeech is not initialized on the construction of responses but it is in clear() method. Any reason for this ? Why not simply delete this attribute ? Looks a bit weird. I guess outputSpeech deletion (instead of rewrite) in clear() would do the trick, but i'm wondering if it would break anything.
Hi,
After a few hours trying to figure out why alexa raised an error on my directive response instead of speeching configured prompt for missing slots, It turned out that alexa-app includes outputSpeech object in its reply, which seems exactly to be the problem. Given a Dialog.Delegate directive telling to rely only on model dialogs, Alexa expect not to have outputSpeech attribute besides this directive.
So I patched this with an ugly delete before replying, but I guess fixing your response construction might benefits to some other users :-)
The monkey patch, within any alexa-app handler getting response object: