 
   send: (user, strings...) ->
     message = strings.join "\n"
-    console.log "Sending reply SMS: #{message} to #{user.id}"
     @send_sms message, user.id, (err, body) =>
       if err or not body?
-        console.log "error sending reply SMS: #{err}"
+        console.log "Error sending reply SMS: #{err}"
+      else
+        console.log "Sending reply SMS: #{message} to #{user.id}"
 
   reply: (user, strings...) ->
     for str in strings

Robot = require '../robot'
HTTP  = require 'http'
Qs    = require 'querystring'

class Twilio extends Robot
  constructor: ->


  run: ->
    server = HTTP.createServer (request, response) =>
      payload = QS.parse(request.url)

      if payload.Body? and payload.From?
        console.log "Received SMS: #{payload.Body} from #{payload.From}"
