Skip to content

Commit

Permalink
Yo
Browse files Browse the repository at this point in the history
  • Loading branch information
onewheelskyward committed Sep 13, 2017
1 parent 0ca7a3f commit 06d1d7e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/lita/handlers/onewheel_alert.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'rest-client'
require 'twilio-ruby'
require 'cgi'

module Lita
module Handlers
Expand All @@ -11,7 +12,7 @@ class OnewheelAlert < Handler
config :alert, required: true

route /.*/i, :alert
http.get "/sms", :respond_sms
http.get '/sms', :respond_sms

def alert(response)
# Lita.logger.debug "Checking for match of #{config.alert} in #{response.matches[0]}"
Expand All @@ -28,7 +29,8 @@ def alert(response)
end

def respond_sms(request, response)
Lita.logger.info request.inspect
qs = CGI.parse request['QUERY_STRING'].body
Lita.logger.info qs.inspect
response.body << "Hello, #{request.body}!"
end

Expand Down

0 comments on commit 06d1d7e

Please sign in to comment.