 
 
   addMessage: (message) ->
-    index = if @lastToFirst then @listController.getItemCount() else 0
+    return  if @messageMap[message.id]
+
+    {lastToFirst} = @getOptions()
+    index = if lastToFirst then @listController.getItemCount() else 0
+    @messageMap[message.id] = yes
     @prependMessage message, index
 
 

    # on page even if events from backend come more than
    # once.
    @participantMap = {}

    @createParticipantsView()




  privateMessageRemoved: (item, index) ->
    {data} = item
    delete @messageMap[data.id]

    prevSibling = @listController.getListItems()[index-1]
    nextSibling = @listController.getListItems()[index]
