 
   updateMessage: ->
 
-    console.log "update message"
+    @setState editMode: no
+    messageBody = @refs.EditMessageTextarea.getDOMNode().value
+    ActivityFlux.actions.message.editMessage @props.message.get('id'), messageBody
 
 
   cancelEdit: ->

          </div>
        </div>
        <div className={editFormClass}>
          <textarea onKeyDown = { @bound 'handleEditMessageKeyDown' } defaultValue={ message.get 'body' }></textarea>
          <button className="solid green done-button" type="button" onClick={@bound 'updateMessage'} >DONE</button>
          <button className="cancel-editing" type="button" onClick={@bound 'cancelEdit'} >CANCEL</button>
        </div>

    key  = keycode code

    @setState editMode: no if key is 'esc'

    if key is 'enter'

      @setState editMode: no
      ActivityFlux.actions.message.editMessage @props.message.get('id'), event.target.value


  render: ->
