   send: (envelope, message) =>
     @robot.logger.debug 'Sending new message to conversation ' + envelope.room
 
-    @post "message/send/#{envelope.room}", {message: message}, (err, resp) ->
+    @post "message/send/#{envelope.room}", {message: message}, (err, resp) =>
       if err isnt null
         @robot.logger.error 'Unable to send a message: '+JSON.stringify err
 

    "topic to #{topic}"
    @post "conversation/set_topic/#{conversation_id}", {
      topic: topic
      }, (err,resp) ->
      @robot.logger.error 'Unable to set topic' if err isnt null

  # Syncs the list of known conversations

    "#{conversation_id} as read"
    @post "message/mark_read/#{conversation_id}", {
      message_nr: message_nr
      }, (err, resp) =>
      @robot.logger.debug 'Message marked as read.' if err is null

  # Change the topic of a conversation
