Created
November 3, 2018 21:06
-
-
Save luizcarvalho/7156565d0c70c371bb395f60eceba2be to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def handle_payloads | |
case current_message.payload | |
when 'MAIN_MENU' | |
step_to flow: 'hello', state: 'main_menu' | |
when 'DIRECTIONS' | |
step_to flow: 'informations', state: 'directions' | |
when 'GENERAL' | |
step_to flow: 'informations', state: 'general' | |
when 'MENU' | |
step_to flow: 'informations', state: 'menu' | |
else | |
step_to flow: 'hello', state: 'say_hello' | |
end | |
current_message.payload = nil | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment