     if not threadId
       throw new Error "Can't send a message with no thread!"
 
-    messageStore.sendNewMessage threadId, content
+    parentId = @state.currentParentId
+    messageStore.sendNewMessage threadId, content, 0, parentId
 
   _renderThreadSidebar: ->
     threads = []

    userIdsToLookup = (userId for userId, _ of userIds)
    loadUsers(userIdsToLookup)

    @setState {messages}

  _switchThread: (threadId) ->
    # TODO: Put this in a listener for scrolling of the thread (or better interaction)


    @state.threadMessageMap[threadId].push messageId

  _getCurrentParentId: ->
    threadId = @_activeValidThread()
    currentParentId = undefined;
    if not threadId or threadId not of @state.threadMessageMap
      return currentParentId

    for messageId in @state.threadMessageMap[threadId]
      parentId = @state.messages[messageId].metadata.ParentId
      if parentId
        currentParentId = parentId
      else if not currentParentId?
        currentParentId = messageId

    return currentParentId

  _onMessageStoreUpdate: (messageIds) ->
    messages = @state.messages
    userIds = {}
