Created
March 16, 2017 16:28
-
-
Save makefunstuff/4cb538a5273ac6cd5786bdefa16bdb0e 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
Bot.on :postback do |postback| | |
case postback.payload | |
when 'SETUP_BOT' | |
postback.reply( | |
text: 'Hello, I am your personal lifelog assistant, let me help you with setup procedure', | |
quick_replies: [ | |
{ | |
content_type: 'text', | |
title: 'I want to set you up', | |
payload: 'setup_started' | |
} | |
] | |
) | |
when 'RESET' | |
# TODO: we will implement reset functionality soon | |
postback.reply(text: 'Reset has been completed') | |
else | |
Rails.logger.warn('Unhandled postback') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment