   unless threads.has channelId
     threads = initThread threads, channelId
 
-  threads = threads.update channelId, (thread) ->
-    thread.setIn ['messages', messageId], messageId
-
-  return threads
+  return threads.setIn [channelId, 'messages', messageId], messageId
+
 
 
 ###*

  ###
  addNewThread: (threads, { channel }) ->

    return initThread threads, channel.id


  ###*

  # for each thread
  return threads.map (thread) ->
    # update messages list with filtering out given messageId.
    thread.update 'messages', (messages) -> messages.remove messageId


###*
