Skip to content

Instantly share code, notes, and snippets.

@makefunstuff
Created March 16, 2017 16:14
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/a814c1fe1261edefb348ea1216c069b4 to your computer and use it in GitHub Desktop.
Save makefunstuff/a814c1fe1261edefb348ea1216c069b4 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')
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