Skip to content

Instantly share code, notes, and snippets.

@makefunstuff
Created March 16, 2017 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makefunstuff/4cb538a5273ac6cd5786bdefa16bdb0e to your computer and use it in GitHub Desktop.
Save makefunstuff/4cb538a5273ac6cd5786bdefa16bdb0e to your computer and use it in GitHub Desktop.
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