                   onClick: @throttledPost
 
 
-  canUpdate: ->
+  canUpdate: =>
     return false if !@props.currentUser.id?
 
     @props.currentUser.isAdmin ||

    .always LoadingOverlay.hide


  setMessage: (e) ->
    @setState message: e.target.value


  submitIfEnter: (e) ->
    return if e.keyCode != 13

    e.preventDefault()
    @throttledPost()


  toggleResolveDiscussion: (e) ->
    @setState resolveDiscussion: e.target.checked


  validPost: ->
    @state.message.length != 0

      @props.currentUser.id == @props.discussion.user_id


  post: =>
    return if !@validPost()
    LoadingOverlay.show()

