Last active
August 1, 2016 12:59
-
-
Save yrezgui/55985444e151050aebe4cc005a128208 to your computer and use it in GitHub Desktop.
Prepare answer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(msg.payload.intents.length > 0) { | |
if(msg.payload.intents[0].intent === "departure_time") { | |
msg.payload = {"text": "The departure time of your flight is at 7:35pm"} | |
} else { | |
msg.payload = {"text": "The arrival time of your flight is at 9:35pm"} | |
} | |
} else { | |
msg.payload = {"text": "Sorry I did not understand"} | |
} | |
return msg; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment