From ba55026b3df083c043018f19d45c6efbed004ebc Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Wed, 4 Jan 2017 07:54:07 -0800 Subject: [PATCH] normalize action alexa seems to sometimes send other values --- controllers/alexa.php | 1 + 1 file changed, 1 insertion(+) diff --git a/controllers/alexa.php b/controllers/alexa.php index c78799c..1a2faa4 100644 --- a/controllers/alexa.php +++ b/controllers/alexa.php @@ -197,6 +197,7 @@ $app->post('/alexa/endpoint', function() use($app) { } $action = $alexaRequest->slots['Action']; + $action = ($action == 'drank' ? 'drank' : 'ate'); $food = ucfirst($alexaRequest->slots['Food']);