             date = formatDate journal.created_on, 'mm/dd/yyyy (hh:ii ap)'
             _.push "#{journal.user.name} on #{date}:"
             _.push "    #{journal.notes}\n"
-      
+
       msg.reply _.join "\n"
 
-# simple ghetto fab date formatter this should definitely be replaced, but didn't want to 
+# simple ghetto fab date formatter this should definitely be replaced, but didn't want to
 # introduce dependencies this early
-# 
+#
 # dateStamp - any string that can initialize a date
 # fmt - format string that may use the following elements
 #       mm - month

  # Robot assign <issue> to <user> ["note to add with the assignment]
  robot.respond /assign (?:issue )?(?:#)?(\d+) to (\w+)(?: "?([^"]+)"?)?/, (msg) ->
    [id, userName, note] = msg.match[1..3]
    
    redmine.Users name:userName, (err, data) ->
      unless data.total_count > 0
        msg.reply "Couldn't find any users with the name \"#{userName}\""
        return false
      
      # try to resolve the user using login/firstname -- take the first result (hacky)
      user = resolveUsers(userName, data.users)[0]
      
      attributes =
        "assigned_to_id": user.id

      # allow an optional note with the re-assign
      attributes["notes"] = "#{msg.message.user.name}: #{note}" if note?
      
      # get our issue
      redmine.Issue(id).update attributes, (err, data) ->
        if err?

  # Private: do a PUT request against the API
  put: (path, body, callback) ->
    @request "PUT", path, body, callback

  # Private: Perform a request against the redmine REST API
  # from the campfire adapter :)
  request: (method, path, body, callback) ->
    headers =
      "Content-Type": "application/json"
      "X-Redmine-API-Key": @token

    endpoint = URL.parse(@url)

    options =
      "host"   : endpoint.hostname
      "path"   : "#{endpoint.pathname}#{path}"
      "method" : method
      "headers": headers

    if method in ["POST", "PUT"]
      if typeof(body) isnt "string"
        body = JSON.stringify body
