 
   getFirstMessageId: ->
 
-    if @props.thread.get 'message'
-      return @props.thread.getIn ['message', '_id']
+    { firstPost } = @props
 
-    return no
+    if firstPost then firstPost.get '_id' else no
 
 
   renderFirstMessageDate: (count) ->
 
-    if @props.thread?.getIn ['flags', 'isMessagesLoading']
+    if @props.isMessagesLoading
       <div className='ChatItem-moreCount'>loading...</div>
     else if count
       <div className='ChatItem-moreCount'>{count} more</div>

    lastMessageId = null
    { messages, showItemMenu } = @props

    messages.map (message, i) =>
      itemProps =
        key          : message.get 'id'
        message      : message

  @defaultProps =
    messages     : immutable.List()
    showItemMenu : yes
    firstPost    : null
    isMessagesLoading: no


  calculateRemainingMessageCount: ->

    { firstPost } = @props
    return no  unless firstPost

    repliesCount = firstPost.get 'repliesCount'
    messageCount = @props.messages.size - 1
    count = repliesCount - messageCount
    count =  if count > 0 then count else 0
